Merge pull request #267 from SHADE-DP/PlayerController

Bug fixes and scene changes
This commit is contained in:
XiaoQiDigipen 2022-11-23 20:53:44 +08:00 committed by GitHub
commit 8227b0993a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 1365 additions and 395 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
Name: Floor_Master
IsActive: true
NumberOfChildren: 5
NumberOfChildren: 6
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
@ -56,17 +56,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 22
Name: Floor_Large
@ -82,17 +71,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 23
Name: Floor_Large
@ -108,17 +86,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 24
Name: Floor_Large
@ -134,17 +101,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 25
Name: Floor_Large
@ -160,17 +116,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 27
Name: Floor_Row_2
@ -197,17 +142,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 29
Name: Floor_Large
@ -223,17 +157,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 30
Name: Floor_Large
@ -249,17 +172,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 31
Name: Floor_Large
@ -275,17 +187,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 32
Name: Floor_Large
@ -301,17 +202,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 33
Name: Floor_Row_3
@ -338,17 +228,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 35
Name: Floor_Large
@ -364,17 +243,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 36
Name: Floor_Large
@ -390,17 +258,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 37
Name: Floor_Large
@ -416,17 +273,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 38
Name: Floor_Large
@ -442,17 +288,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 39
Name: Floor_Row_4
@ -479,17 +314,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 41
Name: Floor_Large
@ -505,17 +329,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 42
Name: Floor_Large
@ -531,17 +344,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 43
Name: Floor_Large
@ -557,17 +359,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 44
Name: Floor_Large
@ -583,17 +374,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 45
Name: Floor_Row_5
@ -620,17 +400,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 47
Name: Floor_Large
@ -646,17 +415,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 48
Name: Floor_Large
@ -672,17 +430,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 49
Name: Floor_Large
@ -698,17 +445,6 @@
Mesh: 142812576
Material: 127069936
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: ~
- EID: 50
Name: Floor_Large
@ -724,11 +460,22 @@
Mesh: 142812576
Material: 127069936
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:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 2, y: 0.0500000007, z: 2}
Half Extents: {x: 10, y: 0.0500000007, z: 18}
Friction: 0.400000006
Bounciness: 0
Density: 1
@ -1588,7 +1335,7 @@
IsActive: true
Scripts: ~
- EID: 85
Name: Floor_Large
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
@ -2328,17 +2075,6 @@
Mesh: 142812576
Material: 132690168
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: ~
- EID: 120
Name: Floor_Large
@ -2354,17 +2090,6 @@
Mesh: 142812576
Material: 132690168
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: ~
- EID: 122
Name: Floor_Row_2
@ -2391,17 +2116,6 @@
Mesh: 142812576
Material: 132690168
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: ~
- EID: 124
Name: Floor_Large
@ -2417,17 +2131,6 @@
Mesh: 142812576
Material: 132690168
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: ~
- EID: 128
Name: Ceiling_Master
@ -3807,7 +3510,7 @@
Components:
Transform Component:
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}
IsActive: true
Renderable Component:
@ -8495,14 +8198,318 @@
Strength: 0.699999988
IsActive: true
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
Name: Player
IsActive: true
NumberOfChildren: 3
Components:
Transform Component:
Translate: {x: 1.82666111, y: 0.00499972701, z: 7.4207387}
Rotate: {x: -0, y: 0, z: 0}
Translate: {x: 2.12735963, y: 0.362327814, z: 6.98932981}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 0.999999881, y: 1, z: 0.999999881}
IsActive: true
Renderable Component:
@ -8517,7 +8524,7 @@
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Y: true
Freeze Position Z: false
Freeze Rotation X: true
Freeze Rotation Y: true
@ -8536,6 +8543,8 @@
IsActive: true
Scripts:
- Type: PlayerController
Enabled: true
respawnPoint: 239
currentState: 0
maxMoveVel: 3
moveForce: 50
@ -8548,16 +8557,17 @@
mediumMultiper: 0.5
heavyMultiper: 0.25
- Type: PickAndThrow
throwForce: [300, 300, 300]
Enabled: true
throwForce: [50, 50, 50]
delayTimer: 1
aimingLength: 1.5
aimingLength: 0.5
- EID: 3
Name: HoldingPoint
IsActive: true
NumberOfChildren: 0
Components:
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}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
@ -8568,14 +8578,14 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: -0.785332263, y: 2.95694828, z: 2.23517329e-08}
Translate: {x: 0, y: -2.98023224e-08, z: 4.76837158e-07}
Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 1.82666111, y: 0.00499972701, z: 7.4207387}
Pitch: -44.9962234
Yaw: 169.420654
Position: {x: 2.12735963, y: 0.362327784, z: 7.98933029}
Pitch: 0
Yaw: 360
Roll: 1.28065994e-06
Width: 1920
Height: 1080
@ -8583,8 +8593,16 @@
Far: 10000
Perspective: 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:
- Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true
armLength: 1
turnSpeedPitch: 0.300000012
turnSpeedYaw: 0.5
@ -8595,7 +8613,7 @@
NumberOfChildren: 0
Components:
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}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
@ -8604,3 +8622,14 @@
Material: 123745521
IsActive: true
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
Name: Default
Name: Canvas
IsActive: true
NumberOfChildren: 1
Components: ~
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
IsActive: true
Scripts: ~
- EID: 1
Name: Default
@ -16,11 +20,11 @@
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129340704
Material: 121834459
IsActive: true
Scripts: ~
- EID: 2
Name: Default
Name: Light
IsActive: true
NumberOfChildren: 0
Components:
@ -34,7 +38,7 @@
IsActive: true
Scripts: ~
- EID: 3
Name: Default
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
@ -55,3 +59,11 @@
Perspective: true
IsActive: true
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
Scripts:
- Type: PlayerController
Enabled: true
currentState: 0
maxMoveVel: 4
moveForce: 50
@ -116,11 +117,13 @@
mediumMultiper: 0.5
heavyMultiper: 0.25
- Type: PickAndThrow
Enabled: true
throwForce: [300, 300, 300]
delayTimer: 1
aimingLength: 1.5
- Type: StateMachine
currentStateName: Idle State
Enabled: true
currentStateName: ""
currentAnimName: ""
- EID: 3
Name: HoldingPoint
@ -140,13 +143,13 @@
Components:
Transform Component:
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}
IsActive: true
Camera Component:
Position: {x: 0.330392599, y: -2.72767258, z: 5.02710676}
Pitch: -42.2981491
Yaw: 16.4989166
Position: {x: -0.0897406489, y: -4.07369709, z: 3.6087606}
Pitch: -42.2981453
Yaw: 16.4989109
Roll: 0
Width: 1920
Height: 1080
@ -156,6 +159,7 @@
IsActive: true
Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true
armLength: 2
turnSpeedPitch: 0.300000012
turnSpeedYaw: 0.5
@ -273,16 +277,17 @@
IsActive: true
Scripts:
- Type: GameManager
Enabled: true
itemPool: 12
zonePool: 15
currGameState: 3
totalItemCount: 2
currGameState: 0
totalItemCount: 0
Score: 0
timer: 4.00741768
timer: 50
- EID: 12
Name: ItemPool
IsActive: true
NumberOfChildren: 2
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 10
@ -334,6 +339,7 @@
IsActive: true
Scripts:
- Type: Item
Enabled: true
Score: 1
currCategory: 0
- EID: 5
@ -385,8 +391,57 @@
IsActive: true
Scripts:
- Type: Item
Enabled: true
Score: 1
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
Name: ScoreZonePool
IsActive: true
@ -430,6 +485,7 @@
IsActive: true
Scripts:
- Type: ScoringZone
Enabled: true
- EID: 14
Name: ScoreZone
IsActive: true
@ -467,3 +523,4 @@
IsActive: true
Scripts:
- 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 System;
using static PlayerController;
using static Item;
public class PickAndThrow : Script
{
@ -17,6 +18,7 @@ public class PickAndThrow : Script
private RigidBody itemRidibody;
private Transform raccoonHoldLocation;
private Transform playerTran;
private Item itemScript;
private ThirdPersonCamera tpc;
private float lastXDir;
private float lastZDir;
@ -59,33 +61,49 @@ public class PickAndThrow : Script
if (Input.GetMouseButtonDown(Input.MouseCode.LeftButton))
{
Debug.Log("AIMING");
pc.isAiming = true;
pc.camArm.ArmLength = aimingLength;
}
if (Input.GetMouseButtonUp(Input.MouseCode.LeftButton) && pc.isAiming)
{
Audio.PlayBGMOnce2D("event:/Raccoon/raccoon_throw");
Audio.PlaySFXOnce2D("event:/Raccoon/raccoon_throw");
pc.isAiming = false;
if(tpc)
pc.camArm.ArmLength = tpc.armLength;
pc.holdItem = false;
inRange = false;
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;
ResetItemObject();
timer = 0.0f;
}
if (Input.GetMouseButtonDown(Input.MouseCode.RightButton))
if (Input.GetMouseButtonDown(Input.MouseCode.RightButton) && !pc.isAiming)
{
pc.holdItem = false;
inRange = false;
itemRidibody.IsGravityEnabled = true;
ResetItemObject();
}
if (Input.GetMouseButtonDown(Input.MouseCode.RightButton) && pc.isAiming)
{
pc.isAiming = false;
if (tpc)
pc.camArm.ArmLength = tpc.armLength;
}
}
else if (!pc.holdItem)
itemRidibody.IsGravityEnabled = true;
@ -105,6 +123,7 @@ public class PickAndThrow : Script
{
itemRidibody = null;
itemTransform = null;
itemScript = null;
item = new GameObject();
}
@ -131,6 +150,10 @@ public class PickAndThrow : Script
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
}
public enum WalkingState
/* public enum WalkingState
{
CARRY,
AIMING,
THROW,
WALK,
TOTAL
}
}*/
public RigidBody rb { get; set; }
private Transform tranform;
@ -36,16 +36,20 @@ public class PlayerController : Script
public bool holdItem { 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")]
public RaccoonStates currentState = RaccoonStates.IDLE;
//Movement variables============================================================
[Tooltip("Max vel for walking")]
public float maxMoveVel = 2.0f;
public float maxMoveVel = 3.0f;
[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")]
public float sprintMultiplier = 2.0f;
public float sprintMultiplier = 1.5f;
private float oldForce;
private float maxOldVel;
@ -56,15 +60,15 @@ public class PlayerController : Script
public bool isMoveKeyPress { get; set; }
[Tooltip("How fast player will turn")]
public float rotationFactorPerFrame = 1.0f;
public float rotationFactorPerFrame = 5.0f;
//Jumping vars==================================================================
[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")]
public float maxJumpTime = 0.75f;
public float maxJumpTime = 0.5f;
[Tooltip("increase gravity when falling")]
public float fallMultipler = 2.0f;
public float fallMultipler = 3.0f;
private float initialJumpVel;
private bool isGrounded = true;
private float gravity = -9.8f;
@ -92,19 +96,14 @@ public class PlayerController : Script
//rigidbody check
rb = GetComponent<RigidBody>();
if (rb == null)
if (!rb)
Debug.LogError("RigidBody is NULL!");
//Transform check
tranform = GetComponent<Transform>();
if(tranform == null)
if(!tranform)
Debug.LogError("tranform is NULL!");
//PickAndThrow check
pat = GetScript<PickAndThrow>();
if (pat == null)
Debug.LogError("PickAndThrow is NULL!");
stateMachine = AddScript<StateMachine>();
Dictionary<Type, BaseState> dictionary = new Dictionary<Type, BaseState>();
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()
{
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)
cam = GetComponentInChildren<Camera>();
if(!camArm)
@ -135,6 +161,7 @@ public class PlayerController : Script
protected override void fixedUpdate()
{
MoveKey();
Move();
Sprint();
@ -338,12 +365,12 @@ public class PlayerController : Script
private void GotCaught()
{
if (currentState == RaccoonStates.CAUGHT && tranform != null)
if (currentState == RaccoonStates.CAUGHT && tranform && respawnPoint)
{
currentState = RaccoonStates.IDLE;
if (stateMachine && !stateMachine.IsState(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>();
}
}
protected override void start()
{
GetComponent<CameraArm>().ArmLength = armLength;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ public class ScoringZone : Script
{
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.totalItemCount -= 1;
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 SHADE;
public class SC_MainMenu : Script
public class MainMenu : Script
{
protected override void awake()
{
Audio.PlayBGMOnce2D("event:/Music/main_menu");
}
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

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

View File

@ -365,7 +365,7 @@ namespace YAML
if (!gfxSystem)
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;
}

View File

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