Merge remote-tracking branch 'origin/main' into SP3-2-Physics

This commit is contained in:
Diren D Bharwani 2022-11-23 22:21:09 +08:00
commit 97837c2829
58 changed files with 1443 additions and 435 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
- VertexShader: 39210065
FragmentShader: 46377769
SubPass: G-Buffer Write
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 54797199
data.alpha: 0
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: MT_Homeowner
ID: 129495479
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: G-Buffer Write
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 54324293
data.alpha: 0
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: UIMat_LoseScene
ID: 123313564
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: G-Buffer Write
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 54429632
data.alpha: 0
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: UIMat_MainMenu
ID: 121834459
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: G-Buffer Write
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 57302694
data.alpha: 0
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: UIMat_WinScene
ID: 129138332
Type: 7

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,13 @@
Name: MD_FoodItems
ID: 79293496
Type: 4
Sub Assets:
Name: Cheese
ID: 141841143
Type: 8
Name: Apple
ID: 144128170
Type: 8
Name: Meat
ID: 136892700
Type: 8

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,7 @@
Name: MD_Homeowner-NoRig
ID: 69970713
Type: 4
Sub Assets:
Name: BodyLow
ID: 140697366
Type: 8

View File

@ -0,0 +1,71 @@
- EID: 0
Name: Light
IsActive: true
NumberOfChildren: 0
Components:
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Directional
Direction: {x: 0, y: 0, z: 1}
Color: {x: 1, y: 1, z: 1, w: 1}
Layer: 4294967295
Strength: 0
IsActive: true
Scripts: ~
- EID: 1
Name: Canvas
IsActive: true
NumberOfChildren: 1
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
IsActive: true
Scripts: ~
- EID: 2
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 123313564
IsActive: true
Scripts: ~
- EID: 3
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 0, y: 0, z: 0}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Scripts: ~
- EID: 4
Name: Default
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: EndScene
Enabled: true
mainGameScene: 86098106
mainMainScene: 97158628

View File

@ -0,0 +1,3 @@
Name: LoseScene
ID: 91685359
Type: 5

View File

@ -23,7 +23,7 @@
- EID: 51 - EID: 51
Name: Floor_Master Name: Floor_Master
IsActive: true IsActive: true
NumberOfChildren: 5 NumberOfChildren: 6
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 0, z: 0} Translate: {x: 0, y: 0, z: 0}
@ -56,17 +56,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 22 - EID: 22
Name: Floor_Large Name: Floor_Large
@ -82,17 +71,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 23 - EID: 23
Name: Floor_Large Name: Floor_Large
@ -108,17 +86,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 24 - EID: 24
Name: Floor_Large Name: Floor_Large
@ -134,17 +101,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 25 - EID: 25
Name: Floor_Large Name: Floor_Large
@ -160,17 +116,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 27 - EID: 27
Name: Floor_Row_2 Name: Floor_Row_2
@ -197,17 +142,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 29 - EID: 29
Name: Floor_Large Name: Floor_Large
@ -223,17 +157,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 30 - EID: 30
Name: Floor_Large Name: Floor_Large
@ -249,17 +172,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 31 - EID: 31
Name: Floor_Large Name: Floor_Large
@ -275,17 +187,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 32 - EID: 32
Name: Floor_Large Name: Floor_Large
@ -301,17 +202,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 33 - EID: 33
Name: Floor_Row_3 Name: Floor_Row_3
@ -338,17 +228,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 35 - EID: 35
Name: Floor_Large Name: Floor_Large
@ -364,17 +243,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 36 - EID: 36
Name: Floor_Large Name: Floor_Large
@ -390,17 +258,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 37 - EID: 37
Name: Floor_Large Name: Floor_Large
@ -416,17 +273,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 38 - EID: 38
Name: Floor_Large Name: Floor_Large
@ -442,17 +288,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 39 - EID: 39
Name: Floor_Row_4 Name: Floor_Row_4
@ -479,17 +314,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 41 - EID: 41
Name: Floor_Large Name: Floor_Large
@ -505,17 +329,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 42 - EID: 42
Name: Floor_Large Name: Floor_Large
@ -531,17 +344,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 43 - EID: 43
Name: Floor_Large Name: Floor_Large
@ -557,17 +359,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 44 - EID: 44
Name: Floor_Large Name: Floor_Large
@ -583,17 +374,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 45 - EID: 45
Name: Floor_Row_5 Name: Floor_Row_5
@ -620,17 +400,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 47 - EID: 47
Name: Floor_Large Name: Floor_Large
@ -646,17 +415,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 48 - EID: 48
Name: Floor_Large Name: Floor_Large
@ -672,17 +430,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 49 - EID: 49
Name: Floor_Large Name: Floor_Large
@ -698,17 +445,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 50 - EID: 50
Name: Floor_Large Name: Floor_Large
@ -724,11 +460,22 @@
Mesh: 142812576 Mesh: 142812576
Material: 127069936 Material: 127069936
IsActive: true IsActive: true
Scripts: ~
- EID: 65779
Name: Floor_Collider
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Collider Component: Collider Component:
Colliders: Colliders:
- Is Trigger: false - Is Trigger: false
Type: Box Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2} Half Extents: {x: 10, y: 0.0500000007, z: 18}
Friction: 0.400000006 Friction: 0.400000006
Bounciness: 0 Bounciness: 0
Density: 1 Density: 1
@ -1588,7 +1335,7 @@
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 85 - EID: 85
Name: Floor_Large Name: Default
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
@ -2328,17 +2075,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 132690168 Material: 132690168
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 120 - EID: 120
Name: Floor_Large Name: Floor_Large
@ -2354,17 +2090,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 132690168 Material: 132690168
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 122 - EID: 122
Name: Floor_Row_2 Name: Floor_Row_2
@ -2391,17 +2116,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 132690168 Material: 132690168
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 124 - EID: 124
Name: Floor_Large Name: Floor_Large
@ -2417,17 +2131,6 @@
Mesh: 142812576 Mesh: 142812576
Material: 132690168 Material: 132690168
IsActive: true IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: -0.00999999978, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~ Scripts: ~
- EID: 128 - EID: 128
Name: Ceiling_Master Name: Ceiling_Master
@ -3807,7 +3510,7 @@
Components: Components:
Transform Component: Transform Component:
Translate: {x: 1.5, y: 0, z: 0.75} Translate: {x: 1.5, y: 0, z: 0.75}
Rotate: {x: -0, y: 0, z: 0} Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 0.999873936, y: 1, z: 0.999873936} Scale: {x: 0.999873936, y: 1, z: 0.999873936}
IsActive: true IsActive: true
Renderable Component: Renderable Component:
@ -8495,14 +8198,318 @@
Strength: 0.699999988 Strength: 0.699999988
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 240
Name: ====ItemPool====
IsActive: true
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 16
Name: Mesh_Apple
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1.20656121, y: 0.124672964, z: 5.97578335}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 144128170
Material: 131956078
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: true
Type: Box
Half Extents: {x: 0.400000006, y: 0.400000006, z: 0.400000006}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: Item
Enabled: true
Score: 10
currCategory: 0
- EID: 242
Name: Mesh_Cheese
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1.89451575, y: 0.156862095, z: 6.01846552}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 141841143
Material: 131956078
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.5, y: 0.150000006, z: 0.5}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: true
Type: Box
Half Extents: {x: 0.699999988, y: 0.300000012, z: 0.75}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: Item
Enabled: true
Score: 100
currCategory: 2
- EID: 241
Name: Mesh_Meat
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.83309579, y: 0.209537908, z: 5.95318222}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 136892700
Material: 131956078
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: true
Type: Box
Half Extents: {x: 0.5, y: 0.5, z: 0.5}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: Item
Enabled: true
Score: 50
currCategory: 1
- EID: 15
Name: ====ScoreZonePool====
IsActive: true
NumberOfChildren: 2
Components: ~
Scripts: ~
- EID: 13
Name: ScoreZone
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.24178481, y: 1.4327563, z: 8.89205742}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
RigidBody Component:
Type: Static
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: true
Type: Box
Half Extents: {x: 1.79999995, y: 1, z: 0.200000003}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: ScoringZone
Enabled: true
- EID: 14
Name: ScoreZone
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -0.5, y: 1.5, z: -5}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
RigidBody Component:
Type: Static
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: true
Type: Box
Half Extents: {x: 1, y: 1, z: 0.200000003}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: ScoringZone
Enabled: true
- EID: 238
Name: ====GameManager====
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: GameManager
Enabled: true
itemPool: 240
zonePool: 15
winScene: 92009475
loseScene: 91685359
currGameState: 0
totalItemCount: 0
Score: 0
timer: 100
scoreText: 237
timeText: 206
- EID: 199
Name: =====Text====
IsActive: true
NumberOfChildren: 2
Components: ~
Scripts: ~
- EID: 237
Name: Score
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -800, y: 400, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 60, y: 60, z: 60}
IsActive: true
Text Renderer Component:
Text: My name is Brandon.
Font: 176667660
IsActive: true
Scripts: ~
- EID: 206
Name: Timer
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 500, y: 400, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 60, y: 60, z: 60}
IsActive: true
Text Renderer Component:
Text: My name is Brandon.
Font: 176667660
IsActive: true
Scripts: ~
- EID: 198
Name: ====Raccoon====
IsActive: true
NumberOfChildren: 2
Components: ~
Scripts: ~
- EID: 2 - EID: 2
Name: Player Name: Player
IsActive: true IsActive: true
NumberOfChildren: 3 NumberOfChildren: 3
Components: Components:
Transform Component: Transform Component:
Translate: {x: 1.82666111, y: 0.00499972701, z: 7.4207387} Translate: {x: 2.12735963, y: 0.362327814, z: 6.98932981}
Rotate: {x: -0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 0.999999881, y: 1, z: 0.999999881} Scale: {x: 0.999999881, y: 1, z: 0.999999881}
IsActive: true IsActive: true
Renderable Component: Renderable Component:
@ -8517,7 +8524,7 @@
Interpolate: true Interpolate: true
Sleeping Enabled: true Sleeping Enabled: true
Freeze Position X: false Freeze Position X: false
Freeze Position Y: false Freeze Position Y: true
Freeze Position Z: false Freeze Position Z: false
Freeze Rotation X: true Freeze Rotation X: true
Freeze Rotation Y: true Freeze Rotation Y: true
@ -8536,6 +8543,8 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: PlayerController - Type: PlayerController
Enabled: true
respawnPoint: 239
currentState: 0 currentState: 0
maxMoveVel: 3 maxMoveVel: 3
moveForce: 50 moveForce: 50
@ -8548,16 +8557,17 @@
mediumMultiper: 0.5 mediumMultiper: 0.5
heavyMultiper: 0.25 heavyMultiper: 0.25
- Type: PickAndThrow - Type: PickAndThrow
throwForce: [300, 300, 300] Enabled: true
throwForce: [50, 50, 50]
delayTimer: 1 delayTimer: 1
aimingLength: 1.5 aimingLength: 0.5
- EID: 3 - EID: 3
Name: HoldingPoint Name: HoldingPoint
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 1.20000005, z: 0.5} Translate: {x: 0, y: 0.700000048, z: 0.200000286}
Rotate: {x: 0, y: 0, z: -0} Rotate: {x: 0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
@ -8568,14 +8578,14 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 0, z: 0} Translate: {x: 0, y: -2.98023224e-08, z: 4.76837158e-07}
Rotate: {x: -0.785332263, y: 2.95694828, z: 2.23517329e-08} Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
Camera Component: Camera Component:
Position: {x: 1.82666111, y: 0.00499972701, z: 7.4207387} Position: {x: 2.12735963, y: 0.362327784, z: 7.98933029}
Pitch: -44.9962234 Pitch: 0
Yaw: 169.420654 Yaw: 360
Roll: 1.28065994e-06 Roll: 1.28065994e-06
Width: 1920 Width: 1920
Height: 1080 Height: 1080
@ -8583,8 +8593,16 @@
Far: 10000 Far: 10000
Perspective: true Perspective: true
IsActive: true IsActive: true
Camera Arm Component:
Arm Pitch: 0
Arm Yaw: 0
Arm Length: 1
Look At Camera Origin: true
Target Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera - Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true
armLength: 1 armLength: 1
turnSpeedPitch: 0.300000012 turnSpeedPitch: 0.300000012
turnSpeedYaw: 0.5 turnSpeedYaw: 0.5
@ -8595,7 +8613,7 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 0, z: 0} Translate: {x: 0, y: -2.98023224e-08, z: 4.76837158e-07}
Rotate: {x: 0, y: 0, z: -0} Rotate: {x: 0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
@ -8604,3 +8622,14 @@
Material: 123745521 Material: 123745521
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 239
Name: RespawnPoint
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 0.660660267, z: 7}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~

View File

@ -1,8 +1,12 @@
- EID: 0 - EID: 0
Name: Default Name: Canvas
IsActive: true IsActive: true
NumberOfChildren: 1 NumberOfChildren: 1
Components: ~ Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
IsActive: true
Scripts: ~ Scripts: ~
- EID: 1 - EID: 1
Name: Default Name: Default
@ -16,11 +20,11 @@
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 141771688 Mesh: 141771688
Material: 129340704 Material: 121834459
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 2 - EID: 2
Name: Default Name: Light
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
@ -34,7 +38,7 @@
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 3 - EID: 3
Name: Default Name: Camera
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
@ -55,3 +59,11 @@
Perspective: true Perspective: true
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 4
Name: Default
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: MainMenu
Enabled: true

View File

@ -0,0 +1,74 @@
- EID: 0
Name: Mesh_Homeowner
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: -1}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 140697366
Material: 129495479
IsActive: true
Scripts: ~
- EID: 1
Name: Light_Ambient
IsActive: true
NumberOfChildren: 0
Components:
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Ambient
Direction: {x: 0, y: 0, z: 1}
Color: {x: 1, y: 1, z: 1, w: 1}
Layer: 4294967295
Strength: 1
IsActive: true
Scripts: ~
- EID: 2
Name: Mesh_Apple
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 144128170
Material: 131956078
IsActive: true
Scripts: ~
- EID: 3
Name: Mesh_Cheese
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 0, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 141841143
Material: 131956078
IsActive: true
Scripts: ~
- EID: 4
Name: Mesh_Meat
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1, y: 0, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 136892700
Material: 131956078
IsActive: true
Scripts: ~

View File

@ -0,0 +1,3 @@
Name: MeshImport
ID: 95609584
Type: 5

View File

@ -104,6 +104,7 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: PlayerController - Type: PlayerController
Enabled: true
currentState: 0 currentState: 0
maxMoveVel: 4 maxMoveVel: 4
moveForce: 50 moveForce: 50
@ -116,11 +117,13 @@
mediumMultiper: 0.5 mediumMultiper: 0.5
heavyMultiper: 0.25 heavyMultiper: 0.25
- Type: PickAndThrow - Type: PickAndThrow
Enabled: true
throwForce: [300, 300, 300] throwForce: [300, 300, 300]
delayTimer: 1 delayTimer: 1
aimingLength: 1.5 aimingLength: 1.5
- Type: StateMachine - Type: StateMachine
currentStateName: Idle State Enabled: true
currentStateName: ""
currentAnimName: "" currentAnimName: ""
- EID: 3 - EID: 3
Name: HoldingPoint Name: HoldingPoint
@ -140,13 +143,13 @@
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 0, z: 0} Translate: {x: 0, y: 0, z: 0}
Rotate: {x: -0.361278683, y: 4.97423792, z: 0} Rotate: {x: -0.738241911, y: 0.48064509, z: 0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
Camera Component: Camera Component:
Position: {x: 0.330392599, y: -2.72767258, z: 5.02710676} Position: {x: -0.0897406489, y: -4.07369709, z: 3.6087606}
Pitch: -42.2981491 Pitch: -42.2981453
Yaw: 16.4989166 Yaw: 16.4989109
Roll: 0 Roll: 0
Width: 1920 Width: 1920
Height: 1080 Height: 1080
@ -156,6 +159,7 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera - Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true
armLength: 2 armLength: 2
turnSpeedPitch: 0.300000012 turnSpeedPitch: 0.300000012
turnSpeedYaw: 0.5 turnSpeedYaw: 0.5
@ -273,16 +277,17 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: GameManager - Type: GameManager
Enabled: true
itemPool: 12 itemPool: 12
zonePool: 15 zonePool: 15
currGameState: 3 currGameState: 0
totalItemCount: 2 totalItemCount: 0
Score: 0 Score: 0
timer: 4.00741768 timer: 50
- EID: 12 - EID: 12
Name: ItemPool Name: ItemPool
IsActive: true IsActive: true
NumberOfChildren: 2 NumberOfChildren: 3
Components: ~ Components: ~
Scripts: ~ Scripts: ~
- EID: 10 - EID: 10
@ -334,6 +339,7 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: Item - Type: Item
Enabled: true
Score: 1 Score: 1
currCategory: 0 currCategory: 0
- EID: 5 - EID: 5
@ -385,8 +391,57 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: Item - Type: Item
Enabled: true
Score: 1 Score: 1
currCategory: 0 currCategory: 0
- EID: 16
Name: Mesh_Apple
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -2.57231402, y: -3.27855849, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 144128170
Material: 131956078
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.100000001, y: 0.100000001, z: 0.100000001}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: true
Type: Box
Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 15 - EID: 15
Name: ScoreZonePool Name: ScoreZonePool
IsActive: true IsActive: true
@ -430,6 +485,7 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: ScoringZone - Type: ScoringZone
Enabled: true
- EID: 14 - EID: 14
Name: ScoreZone Name: ScoreZone
IsActive: true IsActive: true
@ -467,3 +523,4 @@
IsActive: true IsActive: true
Scripts: Scripts:
- Type: ScoringZone - Type: ScoringZone
Enabled: true

View File

@ -0,0 +1,71 @@
- EID: 0
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Directional
Direction: {x: 0, y: 0, z: 1}
Color: {x: 1, y: 1, z: 1, w: 1}
Layer: 4294967295
Strength: 0
IsActive: true
Scripts: ~
- EID: 1
Name: Canvas
IsActive: true
NumberOfChildren: 1
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
IsActive: true
Scripts: ~
- EID: 2
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129138332
IsActive: true
Scripts: ~
- EID: 3
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 0, y: 0, z: 0}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Scripts: ~
- EID: 4
Name: Default
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: EndScene
Enabled: true
mainGameScene: 86098106
mainMainScene: 97158628

View File

@ -0,0 +1,3 @@
Name: WinScene
ID: 92009475
Type: 5

View File

@ -2,6 +2,7 @@
using SHADE_Scripting; using SHADE_Scripting;
using System; using System;
using static PlayerController; using static PlayerController;
using static Item;
public class PickAndThrow : Script public class PickAndThrow : Script
{ {
@ -17,6 +18,7 @@ public class PickAndThrow : Script
private RigidBody itemRidibody; private RigidBody itemRidibody;
private Transform raccoonHoldLocation; private Transform raccoonHoldLocation;
private Transform playerTran; private Transform playerTran;
private Item itemScript;
private ThirdPersonCamera tpc; private ThirdPersonCamera tpc;
private float lastXDir; private float lastXDir;
private float lastZDir; private float lastZDir;
@ -59,33 +61,49 @@ public class PickAndThrow : Script
if (Input.GetMouseButtonDown(Input.MouseCode.LeftButton)) if (Input.GetMouseButtonDown(Input.MouseCode.LeftButton))
{ {
Debug.Log("AIMING");
pc.isAiming = true; pc.isAiming = true;
pc.camArm.ArmLength = aimingLength; pc.camArm.ArmLength = aimingLength;
} }
if (Input.GetMouseButtonUp(Input.MouseCode.LeftButton) && pc.isAiming) if (Input.GetMouseButtonUp(Input.MouseCode.LeftButton) && pc.isAiming)
{ {
Audio.PlayBGMOnce2D("event:/Raccoon/raccoon_throw"); Audio.PlaySFXOnce2D("event:/Raccoon/raccoon_throw");
pc.isAiming = false; pc.isAiming = false;
if(tpc) if(tpc)
pc.camArm.ArmLength = tpc.armLength; pc.camArm.ArmLength = tpc.armLength;
pc.holdItem = false; pc.holdItem = false;
inRange = false; inRange = false;
itemRidibody.IsGravityEnabled = true; itemRidibody.IsGravityEnabled = true;
itemRidibody.AddForce(new Vector3(throwForce.x * lastXDir, throwForce.y, throwForce.z * lastZDir)); if (itemScript)
{
Vector3 vec = new Vector3(throwForce.x * lastXDir, throwForce.y, throwForce.z * lastZDir);
if (itemScript.currCategory == ItemCategory.LIGHT)
itemRidibody.AddForce(vec * 0.3f);
if (itemScript.currCategory == ItemCategory.MEDIUM)
itemRidibody.AddForce(vec * 0.75f);
if (itemScript.currCategory == ItemCategory.HEAVY)
itemRidibody.AddForce(vec);
}
itemRidibody.LinearVelocity += pc.rb.LinearVelocity; itemRidibody.LinearVelocity += pc.rb.LinearVelocity;
ResetItemObject(); ResetItemObject();
timer = 0.0f; timer = 0.0f;
} }
if (Input.GetMouseButtonDown(Input.MouseCode.RightButton)) if (Input.GetMouseButtonDown(Input.MouseCode.RightButton) && !pc.isAiming)
{ {
pc.holdItem = false; pc.holdItem = false;
inRange = false; inRange = false;
itemRidibody.IsGravityEnabled = true; itemRidibody.IsGravityEnabled = true;
ResetItemObject(); ResetItemObject();
} }
if (Input.GetMouseButtonDown(Input.MouseCode.RightButton) && pc.isAiming)
{
pc.isAiming = false;
if (tpc)
pc.camArm.ArmLength = tpc.armLength;
}
} }
else if (!pc.holdItem) else if (!pc.holdItem)
itemRidibody.IsGravityEnabled = true; itemRidibody.IsGravityEnabled = true;
@ -105,6 +123,7 @@ public class PickAndThrow : Script
{ {
itemRidibody = null; itemRidibody = null;
itemTransform = null; itemTransform = null;
itemScript = null;
item = new GameObject(); item = new GameObject();
} }
@ -131,6 +150,10 @@ public class PickAndThrow : Script
itemTransform.LocalEulerAngles = Vector3.Zero; itemTransform.LocalEulerAngles = Vector3.Zero;
} }
itemScript = item.GetScript<Item>();
if(!itemScript)
Debug.Log("Item script EMPTY");
} }
} }

View File

@ -17,14 +17,14 @@ public class PlayerController : Script
TOTAL TOTAL
} }
public enum WalkingState /* public enum WalkingState
{ {
CARRY, CARRY,
AIMING, AIMING,
THROW, THROW,
WALK, WALK,
TOTAL TOTAL
} }*/
public RigidBody rb { get; set; } public RigidBody rb { get; set; }
private Transform tranform; private Transform tranform;
@ -36,16 +36,20 @@ public class PlayerController : Script
public bool holdItem { get; set; } public bool holdItem { get; set; }
public bool isAiming { get; set; } public bool isAiming { get; set; }
[Tooltip("The game object for where the player will respawn to")]
public GameObject respawnPoint;
private float delayTimer = 0.0f;
[Tooltip("The current state fo the raccoon")] [Tooltip("The current state fo the raccoon")]
public RaccoonStates currentState = RaccoonStates.IDLE; public RaccoonStates currentState = RaccoonStates.IDLE;
//Movement variables============================================================ //Movement variables============================================================
[Tooltip("Max vel for walking")] [Tooltip("Max vel for walking")]
public float maxMoveVel = 2.0f; public float maxMoveVel = 3.0f;
[Tooltip("how much force is apply for walking")] [Tooltip("how much force is apply for walking")]
public float moveForce = 2.0f; public float moveForce = 50.0f;
[Tooltip("increase the moveForce and maxMoveVel by its amt")] [Tooltip("increase the moveForce and maxMoveVel by its amt")]
public float sprintMultiplier = 2.0f; public float sprintMultiplier = 1.5f;
private float oldForce; private float oldForce;
private float maxOldVel; private float maxOldVel;
@ -56,15 +60,15 @@ public class PlayerController : Script
public bool isMoveKeyPress { get; set; } public bool isMoveKeyPress { get; set; }
[Tooltip("How fast player will turn")] [Tooltip("How fast player will turn")]
public float rotationFactorPerFrame = 1.0f; public float rotationFactorPerFrame = 5.0f;
//Jumping vars================================================================== //Jumping vars==================================================================
[Tooltip("max height of the jump")] [Tooltip("max height of the jump")]
public float maxJumpHeight = 4.0f; public float maxJumpHeight = 1.0f;
[Tooltip("max amt of time it will take for the jump")] [Tooltip("max amt of time it will take for the jump")]
public float maxJumpTime = 0.75f; public float maxJumpTime = 0.5f;
[Tooltip("increase gravity when falling")] [Tooltip("increase gravity when falling")]
public float fallMultipler = 2.0f; public float fallMultipler = 3.0f;
private float initialJumpVel; private float initialJumpVel;
private bool isGrounded = true; private bool isGrounded = true;
private float gravity = -9.8f; private float gravity = -9.8f;
@ -92,19 +96,14 @@ public class PlayerController : Script
//rigidbody check //rigidbody check
rb = GetComponent<RigidBody>(); rb = GetComponent<RigidBody>();
if (rb == null) if (!rb)
Debug.LogError("RigidBody is NULL!"); Debug.LogError("RigidBody is NULL!");
//Transform check //Transform check
tranform = GetComponent<Transform>(); tranform = GetComponent<Transform>();
if(tranform == null) if(!tranform)
Debug.LogError("tranform is NULL!"); Debug.LogError("tranform is NULL!");
//PickAndThrow check
pat = GetScript<PickAndThrow>();
if (pat == null)
Debug.LogError("PickAndThrow is NULL!");
stateMachine = AddScript<StateMachine>(); stateMachine = AddScript<StateMachine>();
Dictionary<Type, BaseState> dictionary = new Dictionary<Type, BaseState>(); Dictionary<Type, BaseState> dictionary = new Dictionary<Type, BaseState>();
dictionary.Add(typeof(PlayerIdleState), new PlayerIdleState(stateMachine)); dictionary.Add(typeof(PlayerIdleState), new PlayerIdleState(stateMachine));
@ -118,8 +117,35 @@ public class PlayerController : Script
} }
protected override void lateUpdate()
{
//rb.FreezePositionY = false;
}
protected override void update() protected override void update()
{ {
if (delayTimer <= 1)
delayTimer += Time.DeltaTimeF;
if (delayTimer < 1)
{
if (tranform && respawnPoint && rb)
{
rb.LinearVelocity = Vector3.Zero;
tranform.LocalPosition = respawnPoint.GetComponent<Transform>().LocalPosition;
}
}
else
{
rb.FreezePositionY = false;
}
//PickAndThrow check
if (!pat)
{
pat = GetScript<PickAndThrow>();
if(!pat)
Debug.LogError("PickAndThrow is NULL!");
}
if (!cam) if (!cam)
cam = GetComponentInChildren<Camera>(); cam = GetComponentInChildren<Camera>();
if(!camArm) if(!camArm)
@ -135,6 +161,7 @@ public class PlayerController : Script
protected override void fixedUpdate() protected override void fixedUpdate()
{ {
MoveKey(); MoveKey();
Move(); Move();
Sprint(); Sprint();
@ -338,12 +365,12 @@ public class PlayerController : Script
private void GotCaught() private void GotCaught()
{ {
if (currentState == RaccoonStates.CAUGHT && tranform != null) if (currentState == RaccoonStates.CAUGHT && tranform && respawnPoint)
{ {
currentState = RaccoonStates.IDLE; currentState = RaccoonStates.IDLE;
if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState))) if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState)))
stateMachine.SetState(typeof(PlayerIdleState)); stateMachine.SetState(typeof(PlayerIdleState));
tranform.LocalPosition = new Vector3(-3.0f, -2.0f, -5.0f); tranform.LocalPosition = respawnPoint.GetComponent<Transform>().LocalPosition;
} }
} }

View File

@ -29,6 +29,10 @@ namespace SHADE_Scripting
{ {
AddComponent<CameraArm>(); AddComponent<CameraArm>();
} }
}
protected override void start()
{
GetComponent<CameraArm>().ArmLength = armLength; GetComponent<CameraArm>().ArmLength = armLength;
} }

View File

@ -21,7 +21,7 @@ public class PlayerRunState : BaseState
if (timer > delay) if (timer > delay)
{ {
Audio.PlayBGMOnce2D("event:/Raccoon/raccoon_footsteps"); Audio.PlaySFXOnce2D("event:/Raccoon/raccoon_footsteps");
timer = 0; timer = 0;
} }
} }

View File

@ -21,7 +21,7 @@ public class PlayerWalkState : BaseState
if (timer > delay) if (timer > delay)
{ {
Audio.PlayBGMOnce2D("event:/Raccoon/raccoon_footsteps"); Audio.PlaySFXOnce2D("event:/Raccoon/raccoon_footsteps");
timer = 0; timer = 0;
} }
} }

View File

@ -6,17 +6,19 @@ public class GameManager : Script
{ {
public enum GameState public enum GameState
{ {
MAINMENU,
START, START,
WIN, WIN,
LOSE, LOSE
TOTAL
} }
public GameObject itemPool; public GameObject itemPool;
public GameObject zonePool; public GameObject zonePool;
public GameState currGameState;
public uint winScene = 92009475;
public uint loseScene = 91685359;
[NonSerialized]
public GameState currGameState;
[NonSerialized] [NonSerialized]
public int totalItemCount; public int totalItemCount;
[NonSerialized] [NonSerialized]
@ -27,19 +29,18 @@ public class GameManager : Script
private IEnumerable<Item> listOfItems; private IEnumerable<Item> listOfItems;
private IEnumerable<ScoringZone> listOfZone; private IEnumerable<ScoringZone> listOfZone;
public GameObject scoreText;
public GameObject timeText;
private bool once = true;
protected override void awake() protected override void awake()
{ {
Audio.PlayBGMOnce2D("event:/Music/player_undetected");
totalItemCount = 0; totalItemCount = 0;
Score = 0; Score = 0;
currGameState = GameState.MAINMENU; currGameState = GameState.START;
if (itemPool)
{
listOfItems = itemPool.GetScriptsInChildren<Item>();
if (listOfItems != null)
foreach (Item i in listOfItems)
totalItemCount += 1;
}
if (zonePool) if (zonePool)
{ {
@ -52,16 +53,37 @@ public class GameManager : Script
protected override void update() protected override void update()
{ {
if (timer > 0 && currGameState == GameState.START) if (once)
{
if (itemPool)
{
listOfItems = itemPool.GetScriptsInChildren<Item>();
if (listOfItems != null)
foreach (Item i in listOfItems)
totalItemCount += 1;
}
once = false;
}
if (currGameState == GameState.START)
{ {
timer -= Time.DeltaTimeF; timer -= Time.DeltaTimeF;
if (totalItemCount <= 0) if(scoreText)
scoreText.GetComponent<TextRenderable>().Text = $"Score: {Score}";
if(timeText)
timeText.GetComponent<TextRenderable>().Text = $"Time Left: {timer.ToString("0.00")}";
if (timer > 0 && totalItemCount <= 0)
{ {
currGameState = GameState.WIN; currGameState = GameState.WIN;
SceneManager.ChangeScene(winScene);
} }
} else if(timer < 0)
else {
currGameState = GameState.LOSE; currGameState = GameState.LOSE;
SceneManager.ChangeScene(loseScene);
}
}
} }
} }

View File

@ -13,16 +13,10 @@ public class Item : Script
public ItemCategory currCategory; public ItemCategory currCategory;
private RigidBody rb; private RigidBody rb;
private Collider collider;
private bool once = false; private bool once = false;
protected override void awake() protected override void awake()
{ {
collider = GetComponent<Collider>();
if (collider)
{
collider.GetCollisionShape(0).Density = 1;
}
rb = GetComponent<RigidBody>(); rb = GetComponent<RigidBody>();
if (rb) if (rb)
{ {
@ -37,9 +31,9 @@ public class Item : Script
if (once) if (once)
{ {
if(currCategory == ItemCategory.LIGHT) if(currCategory == ItemCategory.LIGHT)
Audio.PlayBGMOnce2D("event:/Props/impact_elastic"); Audio.PlaySFXOnce2D("event:/Props/impact_elastic");
else if (currCategory == ItemCategory.MEDIUM || currCategory == ItemCategory.HEAVY) else if (currCategory == ItemCategory.MEDIUM || currCategory == ItemCategory.HEAVY)
Audio.PlayBGMOnce2D("event:/Props/impact_hard"); Audio.PlaySFXOnce2D("event:/Props/impact_hard");
once = false; once = false;
} }
} }

View File

@ -12,7 +12,7 @@ public class ScoringZone : Script
{ {
if (gameManger && info.GameObject.GetScript<Item>()) if (gameManger && info.GameObject.GetScript<Item>())
{ {
Audio.PlayBGMOnce2D("event:/Music/stingers/item_scored"); Audio.PlaySFXOnce2D("event:/Music/stingers/item_scored");
gameManger.Score += info.GameObject.GetScript<Item>().Score; gameManger.Score += info.GameObject.GetScript<Item>().Score;
gameManger.totalItemCount -= 1; gameManger.totalItemCount -= 1;
info.GameObject.SetActive(false); info.GameObject.SetActive(false);

View File

@ -0,0 +1,31 @@
using System;
using SHADE;
public class EndScene : Script
{
public uint mainGameScene = 86098106;
public uint mainMainScene = 97158628;
protected override void awake()
{
}
protected override void update()
{
if (Input.GetKey(Input.KeyCode.R))
{
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
SceneManager.ChangeScene(mainGameScene);
}
if (Input.GetKey(Input.KeyCode.M))
{
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
SceneManager.ChangeScene(mainMainScene);
}
if (Input.GetKey(Input.KeyCode.Escape))
{
Application.Quit();
}
}
}

View File

@ -0,0 +1,3 @@
Name: SC_EndScene
ID: 165333970
Type: 9

View File

@ -1,13 +1,26 @@
using System; using System;
using SHADE; using SHADE;
public class SC_MainMenu : Script public class MainMenu : Script
{ {
protected override void awake() protected override void awake()
{ {
Audio.PlayBGMOnce2D("event:/Music/main_menu");
} }
protected override void update() protected override void update()
{ {
if (Input.GetKey(Input.KeyCode.Space))
{
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
SceneManager.ChangeScene(86098106);
Audio.StopAllSounds();
}
if (Input.GetKey(Input.KeyCode.Escape))
{
Audio.StopAllSounds();
Application.Quit();
}
} }
} }

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_Homeowner01-1
ID: 54797199
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_LoseScene
ID: 54324293
Type: 3

View File

@ -0,0 +1,3 @@
Name: TX_WinScene
ID: 57302694
Type: 3

View File

@ -8,6 +8,7 @@ namespace SHADE
SHCameraArmComponent::SHCameraArmComponent() SHCameraArmComponent::SHCameraArmComponent()
:pitch(0.0f), yaw(0.0f), armLength(1.0f),offset(), dirty(true), lookAtCameraOrigin(true) :pitch(0.0f), yaw(0.0f), armLength(1.0f),offset(), dirty(true), lookAtCameraOrigin(true)
, targetOffset(0.0f)
{ {
} }
@ -33,6 +34,11 @@ namespace SHADE
return armLength; return armLength;
} }
SHVec3 SHCameraArmComponent::GetTargetOffset() const noexcept
{
return targetOffset;
}
void SHCameraArmComponent::SetPitch(float pitch) noexcept void SHCameraArmComponent::SetPitch(float pitch) noexcept
{ {
this->pitch = pitch; this->pitch = pitch;
@ -51,6 +57,11 @@ namespace SHADE
dirty = true; dirty = true;
} }
void SHCameraArmComponent::SetTargetOffset(SHVec3 offset) noexcept
{
this->targetOffset = offset;
}
}//namespace SHADE }//namespace SHADE
@ -63,6 +74,8 @@ RTTR_REGISTRATION
.property("Arm Pitch", &SHCameraArmComponent::GetPitch, &SHCameraArmComponent::SetPitch) .property("Arm Pitch", &SHCameraArmComponent::GetPitch, &SHCameraArmComponent::SetPitch)
.property("Arm Yaw", &SHCameraArmComponent::GetYaw, &SHCameraArmComponent::SetYaw) .property("Arm Yaw", &SHCameraArmComponent::GetYaw, &SHCameraArmComponent::SetYaw)
.property("Arm Length", &SHCameraArmComponent::GetArmLength, &SHCameraArmComponent::SetArmLength) .property("Arm Length", &SHCameraArmComponent::GetArmLength, &SHCameraArmComponent::SetArmLength)
.property("Look At Camera Origin", &SHCameraArmComponent::lookAtCameraOrigin); .property("Look At Camera Origin", &SHCameraArmComponent::lookAtCameraOrigin)
.property("Target Offset", &SHCameraArmComponent::GetTargetOffset, &SHCameraArmComponent::SetTargetOffset)
;
} }

View File

@ -17,7 +17,7 @@ namespace SHADE
bool dirty; bool dirty;
SHVec3 offset; SHVec3 offset;
SHVec3 targetOffset;
public: public:
friend class SHCameraSystem; friend class SHCameraSystem;
SHCameraArmComponent(); SHCameraArmComponent();
@ -30,11 +30,13 @@ namespace SHADE
float GetPitch() const noexcept; float GetPitch() const noexcept;
float GetYaw() const noexcept; float GetYaw() const noexcept;
float GetArmLength() const noexcept; float GetArmLength() const noexcept;
SHVec3 GetTargetOffset() const noexcept;
//Setters //Setters
void SetPitch(float pitch) noexcept; void SetPitch(float pitch) noexcept;
void SetYaw(float yaw) noexcept; void SetYaw(float yaw) noexcept;
void SetArmLength(float length) noexcept; void SetArmLength(float length) noexcept;
void SetTargetOffset(SHVec3 offset)noexcept;
protected: protected:

View File

@ -182,7 +182,7 @@ namespace SHADE
{ {
camera.offset = arm->GetOffset(); camera.offset = arm->GetOffset();
if (arm->lookAtCameraOrigin) if (arm->lookAtCameraOrigin)
CameraLookAt(camera, camera.position); CameraLookAt(camera, camera.position + arm->GetTargetOffset());
} }
} }

View File

@ -340,7 +340,7 @@ namespace SHADE
} }
// Transfer to GPU // Transfer to GPU
if (transformDataBuffer[frameIndex]) if (transformDataBuffer[frameIndex] && !drawData.empty())
transformDataBuffer[frameIndex]->WriteToMemory(transformData.data(), static_cast<uint32_t>(transformData.size() * sizeof(SHMatrix)), 0, 0); transformDataBuffer[frameIndex]->WriteToMemory(transformData.data(), static_cast<uint32_t>(transformData.size() * sizeof(SHMatrix)), 0, 0);
} }
@ -369,7 +369,7 @@ namespace SHADE
} }
// Transfer to GPU // Transfer to GPU
if (instancedIntegerBuffer[frameIndex]) if (instancedIntegerBuffer[frameIndex] && !drawData.empty())
instancedIntegerBuffer[frameIndex]->WriteToMemory(instancedIntegerData.data(), static_cast<uint32_t>(instancedIntegerData.size() * sizeof(SHInstancedIntegerData)), 0, 0); instancedIntegerBuffer[frameIndex]->WriteToMemory(instancedIntegerData.data(), static_cast<uint32_t>(instancedIntegerData.size() * sizeof(SHInstancedIntegerData)), 0, 0);
} }
@ -507,7 +507,9 @@ namespace SHADE
isCPUBuffersDirty = false; isCPUBuffersDirty = false;
} }
// Send all buffered data to the GPU buffers // Send all buffered data to the GPU buffers if there is anything to render
if (!drawData.empty())
{
using BuffUsage = vk::BufferUsageFlagBits; using BuffUsage = vk::BufferUsageFlagBits;
// - Draw Data // - Draw Data
const uint32_t DRAW_DATA_BYTES = static_cast<uint32_t>(drawData.size() * sizeof(vk::DrawIndexedIndirectCommand)); const uint32_t DRAW_DATA_BYTES = static_cast<uint32_t>(drawData.size() * sizeof(vk::DrawIndexedIndirectCommand));
@ -534,6 +536,7 @@ namespace SHADE
); );
// - Material Properties Buffer // - Material Properties Buffer
rebuildMaterialBuffers(frameIndex, descPool); rebuildMaterialBuffers(frameIndex, descPool);
}
// Mark this frame as no longer dirty // Mark this frame as no longer dirty
isDirty[frameIndex] = false; isDirty[frameIndex] = false;
@ -551,7 +554,7 @@ namespace SHADE
} }
// Nothing to draw // Nothing to draw
if (subBatches.empty()) if (drawData.empty())
return; return;
// Bind all required objects before drawing // Bind all required objects before drawing
@ -586,7 +589,7 @@ namespace SHADE
void SHBatch::rebuildMaterialBuffers(uint32_t frameIndex, Handle<SHVkDescriptorPool> descPool) void SHBatch::rebuildMaterialBuffers(uint32_t frameIndex, Handle<SHVkDescriptorPool> descPool)
{ {
if (matPropsData) if (matPropsData && !drawData.empty())
{ {
SHVkUtil::EnsureBufferAndCopyHostVisibleData SHVkUtil::EnsureBufferAndCopyHostVisibleData
( (

View File

@ -69,7 +69,8 @@ namespace SHADE
if (gfxSystem) if (gfxSystem)
{ {
auto WND = gfxSystem->GetWindow(); auto WND = gfxSystem->GetWindow();
return WND->Close(); if (WND)
WND->Destroy();
} }
SHLOG_WARNING("[SHGraphicsSystemInterface] Failed to close window."); SHLOG_WARNING("[SHGraphicsSystemInterface] Failed to close window.");

View File

@ -140,6 +140,9 @@ namespace SHADE
} }
const double FIXED_DT = physicsSystem->fixedDT; const double FIXED_DT = physicsSystem->fixedDT;
//to be remove =======================================================
dt = std::clamp(dt, 0.0, 1.0 / 30.0);
//to be remove =======================================================
accumulatedTime += dt; accumulatedTime += dt;
//testFunction(); //testFunction();

View File

@ -223,6 +223,7 @@ namespace SHADE
static AssetID GetCurrentSceneAssetID() noexcept; static AssetID GetCurrentSceneAssetID() noexcept;
//Only if scene doesn't exist, and scene asset id needs to be updated to the new one //Only if scene doesn't exist, and scene asset id needs to be updated to the new one
static void SetCurrentSceneAssetID(AssetID const& newAssetID); static void SetCurrentSceneAssetID(AssetID const& newAssetID);
static bool HasSceneChanged() noexcept { return sceneChanged; }
}; };

View File

@ -365,7 +365,7 @@ namespace YAML
if (!gfxSystem) if (!gfxSystem)
return false; return false;
rhs.SetFont(SHResourceManager::LoadOrGet<SHFont>(node[TEXT_YAML_TAG.data()].as<AssetID>())); rhs.SetFont(SHResourceManager::LoadOrGet<SHFont>(node[FONT_YAML_TAG.data()].as<AssetID>()));
} }
return true; return true;
} }

View File

@ -48,4 +48,15 @@ namespace SHADE
{ {
GetNativeComponent()->lookAtCameraOrigin = val; GetNativeComponent()->lookAtCameraOrigin = val;
} }
Vector3 CameraArm::TargetOffset::get()
{
return Convert::ToCLI(GetNativeComponent()->GetTargetOffset());
}
void CameraArm::TargetOffset::set(Vector3 val)
{
GetNativeComponent()->SetTargetOffset(Convert::ToNative(val));
}
} }

View File

@ -36,5 +36,11 @@ namespace SHADE
void set(bool val); void set(bool val);
} }
property Vector3 TargetOffset
{
Vector3 get();
void set(Vector3 val);
}
}; };
} }

View File

@ -21,6 +21,7 @@ namespace SHADE
{ {
public ref class SceneManager abstract sealed public ref class SceneManager abstract sealed
{ {
public :
static void ChangeScene(AssetID sceneAssetID); static void ChangeScene(AssetID sceneAssetID);
}; };
} }

View File

@ -74,8 +74,9 @@ namespace SHADE
// Add the script in // Add the script in
script->Initialize(GameObject(entity)); script->Initialize(GameObject(entity));
entityScriptList->Insert(System::Math::Clamp(index, 0, entityScriptList->Count), script); entityScriptList->Insert(System::Math::Clamp(index, 0, entityScriptList->Count), script);
if (Application::IsPlaying) if (Application::IsPlaying && !SHSceneManager::HasSceneChanged())
{ {
// Only call immediately if we are in game and is not loading another scene
script->Awake(); script->Awake();
script->Start(); script->Start();
} }