diff --git a/Assets/Audio/Master.bank b/Assets/Audio/Master.bank index 21c524fe..49135fbc 100644 Binary files a/Assets/Audio/Master.bank and b/Assets/Audio/Master.bank differ diff --git a/Assets/Audio/Master.strings.bank b/Assets/Audio/Master.strings.bank index 3992afa1..b769c07f 100644 Binary files a/Assets/Audio/Master.strings.bank and b/Assets/Audio/Master.strings.bank differ diff --git a/Assets/Audio/Music.bank b/Assets/Audio/Music.bank index a7a856e5..41112f65 100644 Binary files a/Assets/Audio/Music.bank and b/Assets/Audio/Music.bank differ diff --git a/Assets/Audio/SFX.bank b/Assets/Audio/SFX.bank index d1c9cf58..acf5260a 100644 Binary files a/Assets/Audio/SFX.bank and b/Assets/Audio/SFX.bank differ diff --git a/Assets/Materials/UI/UIMat_Black.shmat b/Assets/Materials/UI/UIMat_Black.shmat index 183b5f26..8451828f 100644 --- a/Assets/Materials/UI/UIMat_Black.shmat +++ b/Assets/Materials/UI/UIMat_Black.shmat @@ -1,6 +1,6 @@ - VertexShader: 46580970 FragmentShader: 50110174 - SubPass: UI + SubPass: UI Translucent Properties: data.color: {x: 0, y: 0, z: 0, w: 1} data.textureIndex: 0 diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 0c3fc9cd..3989fa4a 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -78,12 +78,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -132,12 +129,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -186,12 +180,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -240,12 +231,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -294,12 +282,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -348,12 +333,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -402,12 +384,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -456,12 +435,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -514,12 +490,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -558,12 +531,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -602,12 +572,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -646,12 +613,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -690,12 +654,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -744,12 +705,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -798,12 +756,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -852,12 +807,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -906,12 +858,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -960,12 +909,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1014,12 +960,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1068,12 +1011,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1122,12 +1062,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1176,12 +1113,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1230,12 +1164,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1284,12 +1215,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1338,12 +1266,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1392,12 +1317,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1446,12 +1368,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1500,12 +1419,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1554,12 +1470,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1608,12 +1521,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1662,12 +1572,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1716,12 +1623,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1774,12 +1678,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1828,12 +1729,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1882,12 +1780,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1936,12 +1831,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1990,12 +1882,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2044,12 +1933,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2098,12 +1984,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2152,12 +2035,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: false Freeze Position X: false @@ -2210,12 +2090,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: false Freeze Position X: false @@ -2264,12 +2141,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2318,12 +2192,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2372,12 +2243,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2426,12 +2294,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2480,12 +2345,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2538,12 +2400,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2592,12 +2451,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2646,12 +2502,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2700,12 +2553,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2754,12 +2604,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2808,12 +2655,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2866,12 +2710,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2910,12 +2751,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2954,12 +2792,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2998,12 +2833,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3042,12 +2874,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3100,12 +2929,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3144,12 +2970,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3188,12 +3011,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3232,12 +3052,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3276,12 +3093,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3334,12 +3148,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3378,12 +3189,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3422,12 +3230,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3466,12 +3271,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3512,12 +3314,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: true Freeze Position X: false @@ -3577,12 +3376,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: true Freeze Position X: false @@ -3681,7 +3477,6 @@ Text: My name is Brandon. Font: 174412429 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3723,7 +3518,6 @@ Text: My name is Brandon. Font: 176667660 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3745,7 +3539,6 @@ Text: X2 Font: 174412429 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3800,12 +3593,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: false - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3852,8 +3642,6 @@ delayTimer: 1 aimingLength: 1 throwItem: false - silhouettePlayer: 51000 - silhouetteBag: 51000 rayDistance: 0.75 rayHeight: 0.100000001 aimingFOV: 50 @@ -3986,12 +3774,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4034,12 +3819,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4078,12 +3860,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4122,12 +3901,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4166,12 +3942,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4210,12 +3983,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4258,12 +4028,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4302,12 +4069,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4346,12 +4110,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4390,12 +4151,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4434,12 +4192,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4482,12 +4237,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4526,12 +4278,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4570,12 +4319,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4614,12 +4360,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4658,12 +4401,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4706,12 +4446,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4750,12 +4487,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4794,12 +4528,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4838,12 +4569,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4882,12 +4610,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4930,12 +4655,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4974,12 +4696,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5018,12 +4737,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5062,12 +4778,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5106,12 +4819,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5154,12 +4864,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5198,12 +4905,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5242,12 +4946,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5286,12 +4987,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5330,12 +5028,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5378,12 +5073,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5422,12 +5114,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5466,12 +5155,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5510,12 +5196,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5554,12 +5237,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5602,12 +5282,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5646,12 +5323,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5690,12 +5364,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5734,12 +5405,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5778,12 +5446,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5826,12 +5491,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5870,12 +5532,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5914,12 +5573,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5958,12 +5614,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6002,12 +5655,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6050,12 +5700,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6094,12 +5741,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6138,12 +5782,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6182,12 +5823,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6309,12 +5947,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: true Freeze Position X: false @@ -6364,12 +5999,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6551,7 +6183,6 @@ Text: Game Pause Font: 176667660 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: false UI Component: Canvas ID: 10 diff --git a/Assets/Scenes/PhysicsTest.shade b/Assets/Scenes/PhysicsTest.shade index 20903809..442ff096 100644 --- a/Assets/Scenes/PhysicsTest.shade +++ b/Assets/Scenes/PhysicsTest.shade @@ -10,9 +10,12 @@ IsActive: true RigidBody Component: Type: Dynamic + Auto Mass: false + Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true + Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -75,10 +78,10 @@ Yaw: 0 Roll: 0 Width: 1920 - Height: 1080 Near: 0.00999999978 Far: 10000 Perspective: true + FOV: 90 IsActive: true Scripts: ~ - EID: 65539 @@ -185,9 +188,12 @@ IsActive: true RigidBody Component: Type: Dynamic + Auto Mass: false + Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true + Gravity Scale: 1 Interpolate: true Sleeping Enabled: true Freeze Position X: false diff --git a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs index 2a3647b3..d82d399a 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs @@ -1,4 +1,4 @@ -/********************************************************************* +/********************************************************************* * \file LeafChase.cs * \author Ryan Wang Nian Jing * \brief Leaf node implementation for AI chasing the player @@ -113,7 +113,8 @@ public partial class LeafChase : BehaviourTreeNode if (GetNodeData("isAlert") != null && (bool)GetNodeData("isAlert") == true) { //AudioHandler.audioClipHandlers["BGMAdpative"].SetParameter("Detected", 0.0f); - Audio.SetParameter("Detected", 0.0f); + //Audio.SetParameter("Detected", 0.0f); + Audio.SetParameterWithLabel("PlayerDetection", "Undetected"); AudioHandler.audioClipHandlers["SFXHumming"].Play(); } SetNodeData("isAlert", false); diff --git a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs index ba061972..14c95fc6 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs @@ -1,4 +1,4 @@ -/********************************************************************* +/********************************************************************* * \file LeafPatrol.cs * \author Ryan Wang Nian Jing * \brief Leaf node implementation for patrolling AI @@ -245,7 +245,8 @@ public partial class LeafPatrol : BehaviourTreeNode AudioHandler.audioClipHandlers["SFXHumming"].Play(); //AudioHandler.audioClipHandlers["BGMUnalert"].Play(); //AudioHandler.audioClipHandlers["BGMAdaptive"].SetParameter("Detected", 0.0f); - Audio.SetParameter("Detected", 0.0f); + //Audio.SetParameter("Detected", 0.0f); + Audio.SetParameterWithLabel("PlayerDetection", "Undetected"); } SetNodeData("isAlert", false); } diff --git a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs index b2760e4a..6a69cbc4 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs @@ -1,4 +1,4 @@ -/********************************************************************* +/********************************************************************* * \file LeafSearch.cs * \author Ryan Wang Nian Jing * \brief Leaf node implementation for AI searching for player @@ -26,6 +26,7 @@ public partial class LeafSearch : BehaviourTreeNode private Vector3 eyeOffset; private float sightDistance; private GameObject? player; //To be searched for and marked + private bool screamOnce; } //FUNCTIONS HERE @@ -67,7 +68,8 @@ public partial class LeafSearch : BehaviourTreeNode if (GetNodeData("isAlert") != null && (bool)GetNodeData("isAlert") == true) { //AudioHandler.audioClipHandlers["BGMAdaptive"].SetParameter("Detected", 0.0f); - Audio.SetParameter("Detected", 0.0f); + //Audio.SetParameter("Detected", 0.0f); + Audio.SetParameterWithLabel("PlayerDetection", "Undetected"); AudioHandler.audioClipHandlers["SFXHumming"].Play(); reevaluateWaypoint(); } @@ -97,6 +99,7 @@ public partial class LeafSearch : BehaviourTreeNode //Search for player player = GameObject.Find("Player"); + screamOnce = false; //Automatically fail if no player is found if (player == null) @@ -188,31 +191,41 @@ public partial class LeafSearch : BehaviourTreeNode if (GetNodeData("isAlert") == null) { SetNodeData("isAlert", true); + screamOnce = true; //Audio.StopAllSounds(); - AudioHandler.audioClipHandlers["SFXDetectAh"].Play(); + //AudioHandler.audioClipHandlers["SFXDetectAh"].Play(); AudioHandler.audioClipHandlers["SFXDetectSting"].Play(); //AudioHandler.audioClipHandlers["BGMAlert"].Play(); AudioHandler.audioClipHandlers["SFXHumming"].Stop(false); //AudioHandler.audioClipHandlers["BGMUnalert"].Stop(true); //AudioHandler.audioClipHandlers["BGMAdaptive"].SetParameter("Detected", 1.0f); - Audio.SetParameter("Detected", 1.0f); + //Audio.SetParameter("Detected", 1.0f); + Audio.SetParameterWithLabel("PlayerDetection", "Detected"); } else { if (GetNodeData("isAlert") != null && (bool)GetNodeData("isAlert") == false) { //Audio.StopAllSounds(); - AudioHandler.audioClipHandlers["SFXDetectAh"].Play(); + screamOnce = true; + //AudioHandler.audioClipHandlers["SFXDetectAh"].Play(); AudioHandler.audioClipHandlers["SFXDetectSting"].Play(); //AudioHandler.audioClipHandlers["BGMAlert"].Play(); AudioHandler.audioClipHandlers["SFXHumming"].Stop(false); //AudioHandler.audioClipHandlers["BGMUnalert"].Stop(true); //AudioHandler.audioClipHandlers["BGMAdaptive"].SetParameter("Detected", 1.0f); - Audio.SetParameter("Detected", 1.0f); + //Audio.SetParameter("Detected", 1.0f); + Audio.SetParameterWithLabel("PlayerDetection", "Detected"); } SetNodeData("isAlert", true); } + if (screamOnce) + { + screamOnce = false; + AudioHandler.audioClipHandlers["SFXDetectAh"].Play(); + } + status = BehaviourTreeNodeStatus.SUCCESS; onExit(BehaviourTreeNodeStatus.SUCCESS); return status; diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index ee974787..d1cb8685 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -83,10 +83,10 @@ public class GameManager : Script protected override void start() { - AudioHandler.audioClipHandlers["BGMAdaptive"] = Audio.CreateAudioClip("event:/Music/bgm_adaptive"); + AudioHandler.audioClipHandlers["BGMAdaptive"] = Audio.CreateAudioClip("event:/Music/bgm_adaptive_new"); AudioHandler.audioClipHandlers["BGMAdaptive"].Play(); - Audio.SetParameter("Detected", 0.0f); + Audio.SetParameterWithLabel("PlayerDetection", "Undetected"); AudioHandler.audioClipHandlers["KitchenAmbience"] = Audio.CreateAudioClip("event:/Ambience/roomtone_kitchen"); AudioHandler.audioClipHandlers["KitchenAmbience"].Play(); @@ -95,18 +95,24 @@ public class GameManager : Script AudioHandler.audioClipHandlers["SFXHumming"].SetVolume(0.15f); AudioHandler.audioClipHandlers["SFXHumming"].Play(); - SceneFadeInOut.Instance.CallFadeOut(); + if (SceneFadeInOut.Instance != null) + SceneFadeInOut.Instance.CallFadeOut(); + Application.IsCursorVisible = false; } protected override void update() { if (GamePause || !stealFoodPopUpDone) { + Input.SetMouseCentering(false); + //Application.IsCursorVisible = true; return; } if (currGameState == GameState.START) { + Input.SetMouseCentering(true); + timer -= Time.DeltaTimeF; if(scoreText) scoreText.GetComponent().Text = $"{Score}"; @@ -138,7 +144,8 @@ public class GameManager : Script AudioHandler.StopAllSounds(false); AudioHandler.audioClipHandlers["BGMWin"].Play(); goingToWin = true; - SceneFadeInOut.Instance.CallFadeIn(); + if (SceneFadeInOut.Instance != null) + SceneFadeInOut.Instance.CallFadeIn(); } else if(!goingToWin && (timer < 0 || Input.GetKeyDown(Input.KeyCode.F2))) { @@ -146,12 +153,27 @@ public class GameManager : Script AudioHandler.StopAllSounds(false); AudioHandler.audioClipHandlers["BGMLose"].Play(); goingToLose = true; - SceneFadeInOut.Instance.CallFadeIn(); + if (SceneFadeInOut.Instance != null) + SceneFadeInOut.Instance.CallFadeIn(); } } //Handling transitions - if (SceneFadeInOut.Instance.FadeInFinished()) + if (SceneFadeInOut.Instance != null) + { + if (SceneFadeInOut.Instance.FadeInFinished()) + { + if (goingToWin) + { + SceneManager.ChangeScene(winScene); + } + if (goingToLose) + { + SceneManager.ChangeScene(loseScene); + } + } + } + else { if (goingToWin) { diff --git a/Assets/Scripts/Tests/PhysicsTestObj.cs b/Assets/Scripts/Tests/PhysicsTestObj.cs index e9c5c310..f4c6415e 100644 --- a/Assets/Scripts/Tests/PhysicsTestObj.cs +++ b/Assets/Scripts/Tests/PhysicsTestObj.cs @@ -1,4 +1,4 @@ -using SHADE; +using SHADE; using System; using System.Collections.Generic; using static Item; @@ -65,37 +65,8 @@ public class PhysicsTestObj : Script }; public float forceAmount = 50.0f; - public float torqueAmount = 25.0f; + public float torqueAmount = 500.0f; - protected override void onTriggerEnter(CollisionInfo info) - { - Debug.Log("Trigger Enter"); - } - - protected override void onTriggerStay(CollisionInfo info) - { - Debug.Log("Trigger Stay"); - } - - protected override void onTriggerExit(CollisionInfo info) - { - Debug.Log("Trigger Exit"); - } - - protected override void onCollisionEnter(CollisionInfo info) - { - Debug.Log("Collision Enter"); - } - - protected override void onCollisionStay(CollisionInfo info) - { - Debug.Log("Collision Stay"); - } - - protected override void onCollisionExit(CollisionInfo info) - { - Debug.Log("Collision Exit"); - } protected override void awake() { tf = GetComponent(); diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs b/Assets/Scripts/UI/SC_ChangeSceneButton.cs index 6a51716b..c1ab681b 100644 --- a/Assets/Scripts/UI/SC_ChangeSceneButton.cs +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Reflection.Metadata.Ecma335; using SHADE; using SHADE_Scripting.UI; @@ -22,22 +22,19 @@ public class ChangeSceneButton : Script { ui.OnRelease.RegisterAction(() => { - if (sceneID != 0) { - Audio.PlaySFXOnce2D("event:/UI/success"); - - Audio.StopAllSounds(); - + Audio.PlaySFXOnce2D("event:/UI/success"); + Audio.StopAllSounds(); + if (SceneFadeInOut.Instance != null) SceneFadeInOut.Instance.CallFadeIn(); - clickedFlag = true; + clickedFlag = true; } }); } else { Debug.LogError("Failed to register button action for ChangeSceneButton."); - } } protected override void update() diff --git a/Assets/Scripts/UI/SC_EndScene.cs b/Assets/Scripts/UI/SC_EndScene.cs index 2117b24a..9e8de4c5 100644 --- a/Assets/Scripts/UI/SC_EndScene.cs +++ b/Assets/Scripts/UI/SC_EndScene.cs @@ -1,6 +1,7 @@ -using System; +using System; using SHADE; using SHADE_Scripting.Audio; +using SHADE_Scripting.UI; public class EndScene : Script { @@ -12,6 +13,15 @@ public class EndScene : Script AudioHandler.audioClipHandlers["SFXMouseDownElement"] = Audio.CreateAudioClip("event:/UI/mouse_down_element"); AudioHandler.audioClipHandlers["SFXUISuccess"] = Audio.CreateAudioClip("event:/UI/success"); } + + protected override void start() + { + Input.SetMouseCentering(false); + Debug.Log("EndScene::Start():"); + Application.IsCursorVisible = true; + SceneFadeInOut.Instance.CallFadeOut(); + } + protected override void update() { if (Input.GetKeyDown(Input.KeyCode.R)) diff --git a/Assets/Scripts/UI/SC_MainMenu.cs b/Assets/Scripts/UI/SC_MainMenu.cs index 59b6594e..0e1aa957 100644 --- a/Assets/Scripts/UI/SC_MainMenu.cs +++ b/Assets/Scripts/UI/SC_MainMenu.cs @@ -1,6 +1,7 @@ -using System; +using System; using SHADE; using SHADE_Scripting.Audio; +using SHADE_Scripting.UI; public class MainMenu : Script { @@ -23,6 +24,9 @@ public class MainMenu : Script protected override void start() { + Input.SetMouseCentering(false); + Application.IsCursorVisible = true; + SceneFadeInOut.Instance.CallFadeOut(); } protected override void update() { diff --git a/Assets/Scripts/UI/SC_PauseMenu.cs b/Assets/Scripts/UI/SC_PauseMenu.cs index 8e9ec42c..822c416c 100644 --- a/Assets/Scripts/UI/SC_PauseMenu.cs +++ b/Assets/Scripts/UI/SC_PauseMenu.cs @@ -13,7 +13,8 @@ public class PauseMenu : Script protected override void awake() { - GameManager.Instance.GamePause = false; + if (GameManager.Instance != null) + GameManager.Instance.GamePause = false; if (canvas) { @@ -41,6 +42,8 @@ public class PauseMenu : Script if (GameManager.Instance.GamePause) { GameManager.Instance.GamePause = false; + Input.SetMouseCentering(true); + Application.IsCursorVisible = false; AudioHandler.PauseAllSounds(false); if (gamePauseText) gamePauseText.Enabled = false; @@ -91,6 +94,8 @@ public class PauseMenu : Script if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause && GameManager.Instance.stealFoodPopUpDone) { GameManager.Instance.GamePause = true; + Input.SetMouseCentering(false); + Application.IsCursorVisible = true; AudioHandler.PauseAllSounds(true); if (gamePauseText) gamePauseText.Enabled = true; diff --git a/Assets/Scripts/UI/SC_SceneFadeInOut.cs b/Assets/Scripts/UI/SC_SceneFadeInOut.cs index f4469591..81710f2d 100644 --- a/Assets/Scripts/UI/SC_SceneFadeInOut.cs +++ b/Assets/Scripts/UI/SC_SceneFadeInOut.cs @@ -43,7 +43,6 @@ namespace SHADE_Scripting.UI protected override void start() { - } protected override void update() @@ -56,7 +55,6 @@ namespace SHADE_Scripting.UI if (fadeInTime == 0.0f) { alphaValue = 1.0f; - } else { @@ -64,7 +62,8 @@ namespace SHADE_Scripting.UI } if (alphaValue >= 1.0f) { - alphaValue = 1.0f; + alphaValue = 1.0f; + //GameObject.Parent.SetActive(false); } } @@ -82,8 +81,10 @@ namespace SHADE_Scripting.UI } if (alphaValue <= 0.0f) { - alphaValue = 0.0f; - GameObject.Parent.SetActive(false); + alphaValue = 0.0f; + //This line is to be added so that (because the fade in and out item is usually the front-most UI element) + //the fade in and out UI element does not block functionality of other UI elements + GameObject.Parent.SetActive(false); } } diff --git a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp index e02eac50..60b709c2 100644 --- a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp +++ b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp @@ -656,6 +656,15 @@ namespace SHADE } } + void SHAudioSystem::SetParameterWithLabel(const char* path, const char* label) + { + result = fmodStudioSystem->setParameterByNameWithLabel(path, label); + if (result != FMOD_OK) + { + ErrorCheck(); + } + } + void AudioClip::Play() { if(!instance) @@ -734,12 +743,16 @@ namespace SHADE } } - //void AudioClip::SetParameterLabel(const char* paramName, const char* label) - //{ - // if (!instance) - // return; - // instance->setParameterByNameWithLabel(paramName, label); - //} + void AudioClip::SetParameterWithLabel(const char* paramName, const char* label) + { + if (!instance) + return; + FMOD_RESULT result = instance->setParameterByNameWithLabel(paramName, label); + if (result != FMOD_OK) + { + SHLOG_ERROR("Audio system error: {}", FMOD_ErrorString(result)) + } + } float AudioClip::GetParameterValue(const char* paramName) { diff --git a/SHADE_Engine/src/AudioSystem/SHAudioSystem.h b/SHADE_Engine/src/AudioSystem/SHAudioSystem.h index 68942a8e..99ff7953 100644 --- a/SHADE_Engine/src/AudioSystem/SHAudioSystem.h +++ b/SHADE_Engine/src/AudioSystem/SHAudioSystem.h @@ -33,7 +33,7 @@ namespace SHADE void SetPause(bool pause); bool IsPaused(); void SetParameter(const char* paramName, float value); - //void SetParameterLabel(const char* paramName, const char* label); + void SetParameterWithLabel(const char* paramName, const char* label); float GetParameterValue(const char* paramName); float GetVolume(); void SetVolume(float volume); @@ -94,6 +94,7 @@ namespace SHADE float GetParameterValue(const char* path); void SetParameter(const char* path, float value); + void SetParameterWithLabel(const char* path, const char* label); private: FMOD::Studio::System* fmodStudioSystem; diff --git a/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp b/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp index a0aaf0fa..a6e506b5 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp @@ -376,7 +376,9 @@ namespace SHADE { if(editor->LoadScene(asset->id)) { +#ifdef SHEDITOR editor->editorConfig->workingSceneID = asset->id; +#endif } } break; diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index f6a78bc5..fbc93efd 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -787,4 +787,4 @@ namespace SHADE ImGui::PopID(); } -} +} \ No newline at end of file diff --git a/SHADE_Engine/src/Editor/SHEditor.cpp b/SHADE_Engine/src/Editor/SHEditor.cpp index 346bfbed..6d71f98d 100644 --- a/SHADE_Engine/src/Editor/SHEditor.cpp +++ b/SHADE_Engine/src/Editor/SHEditor.cpp @@ -592,8 +592,10 @@ namespace SHADE { //Load the scene sceneToLoad = 0; +#ifdef SHEDITOR editorConfig->workingSceneID = assetID; SHConfigurationManager::SaveEditorConfig(); +#endif SHSceneManager::RestartScene(assetID); return true; } diff --git a/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp b/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp index 078d9fc8..84df5f88 100644 --- a/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp +++ b/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp @@ -198,7 +198,8 @@ namespace SHADE void SHWindow::SetMouseVisible(bool show) { - ShowCursor(show); + while(GetMouseVisible() != show) + ShowCursor(show); } void SHWindow::SetMousePosition(int x, int y) diff --git a/SHADE_Engine/src/Math/SHRay.cpp b/SHADE_Engine/src/Math/SHRay.cpp index b4c66c09..c6268851 100644 --- a/SHADE_Engine/src/Math/SHRay.cpp +++ b/SHADE_Engine/src/Math/SHRay.cpp @@ -10,6 +10,8 @@ #include +#include + // Primary Header #include "SHRay.h" diff --git a/SHADE_Engine/src/Math/SHRay.h b/SHADE_Engine/src/Math/SHRay.h index 56599018..c4d8c9a5 100644 --- a/SHADE_Engine/src/Math/SHRay.h +++ b/SHADE_Engine/src/Math/SHRay.h @@ -13,8 +13,13 @@ // Project Headers #include "Vector/SHVec3.h" +/*-------------------------------------------------------------------------------------*/ +/* Forward Declarations */ +/*-------------------------------------------------------------------------------------*/ + namespace SHADE { + /*-----------------------------------------------------------------------------------*/ /* Type Definitions */ /*-----------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Physics/Collision/Contacts/SHCollisionKey.h~HEAD b/SHADE_Engine/src/Physics/Collision/Contacts/SHCollisionKey.h~HEAD new file mode 100644 index 00000000..811f8375 --- /dev/null +++ b/SHADE_Engine/src/Physics/Collision/Contacts/SHCollisionKey.h~HEAD @@ -0,0 +1,117 @@ +/**************************************************************************************** + * \file SHCollisionID.h + * \author Diren D Bharwani, diren.dbharwani, 390002520 + * \brief Interface for Collision Information for Collision & Triggers. + * + * \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or + * disclosure of this file or its contents without the prior written consent + * of DigiPen Institute of Technology is prohibited. +****************************************************************************************/ + +#pragma once + +// Project Headers +#include "Physics/Interface/SHColliderComponent.h" +#include "Physics/Interface/SHRigidBodyComponent.h" + + +namespace SHADE +{ + /*-----------------------------------------------------------------------------------*/ + /* Forward Declarations */ + /*-----------------------------------------------------------------------------------*/ + + struct SHCollisionKeyHash; + + /*-----------------------------------------------------------------------------------*/ + /* Type Definitions */ + /*-----------------------------------------------------------------------------------*/ + + /** + * @brief + * Encapsulates the information when two collision shapes intersect. + */ + class SH_API SHCollisionKey + { + private: + /*---------------------------------------------------------------------------------*/ + /* Friends */ + /*---------------------------------------------------------------------------------*/ + + friend struct SHCollisionKeyHash; + + public: + /*---------------------------------------------------------------------------------*/ + /* Constructors & Destructor */ + /*---------------------------------------------------------------------------------*/ + + SHCollisionKey () noexcept; + SHCollisionKey (const SHCollisionKey& rhs) noexcept; + SHCollisionKey (SHCollisionKey&& rhs) noexcept; + + ~SHCollisionKey () noexcept = default; + + /*---------------------------------------------------------------------------------*/ + /* Operator Overloads */ + /*---------------------------------------------------------------------------------*/ + + SHCollisionKey& operator= (const SHCollisionKey& rhs) noexcept; + SHCollisionKey& operator= (SHCollisionKey&& rhs) noexcept; + + bool operator==(const SHCollisionKey& rhs) const; + + /*---------------------------------------------------------------------------------*/ + /* Getter Functions */ + /*---------------------------------------------------------------------------------*/ + + [[nodiscard]] EntityID GetEntityA () const noexcept; + [[nodiscard]] EntityID GetEntityB () const noexcept; + [[nodiscard]] uint32_t GetShapeIndexA () const noexcept; + [[nodiscard]] uint32_t GetShapeIndexB () const noexcept; + [[nodiscard]] const SHRigidBodyComponent* GetRigidBodyA () const noexcept; + [[nodiscard]] const SHRigidBodyComponent* GetRigidBodyB () const noexcept; + [[nodiscard]] const SHCollisionShape* GetCollisionShapeA () const noexcept; + [[nodiscard]] const SHCollisionShape* GetCollisionShapeB () const noexcept; + + /*---------------------------------------------------------------------------------*/ + /* Setter Functions */ + /*---------------------------------------------------------------------------------*/ + + void SetEntityA (EntityID entityID) noexcept; + void SetEntityB (EntityID entityID) noexcept; + void SetCollisionShapeA (uint32_t shapeIndexA) noexcept; + void SetCollisionShapeB (uint32_t shapeIndexB) noexcept; + + private: + + static constexpr uint32_t ENTITY_A = 0; + static constexpr uint32_t SHAPE_INDEX_A = 1; + static constexpr uint32_t ENTITY_B = 2; + static constexpr uint32_t SHAPE_INDEX_B = 3; + + /*---------------------------------------------------------------------------------*/ + /* Data Members */ + /*---------------------------------------------------------------------------------*/ + + union + { + uint64_t value[2]; // EntityValue, ShapeIndexValue + uint32_t ids [4]; // EntityA, EntityB, ShapeIndexA, ShapeIndexB + }; + }; + + /** + * @brief + * Encapsulates a functor to hash a CollisionKey + */ + struct SHCollisionKeyHash + { + public: + /*---------------------------------------------------------------------------------*/ + /* Member Functions */ + /*---------------------------------------------------------------------------------*/ + + std::size_t operator()(const SHCollisionKey& id) const; + }; + +} // namespace SHADE \ No newline at end of file diff --git a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHCollisionUtils.cpp~HEAD b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHCollisionUtils.cpp~HEAD new file mode 100644 index 00000000..c4267ca8 --- /dev/null +++ b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHCollisionUtils.cpp~HEAD @@ -0,0 +1,38 @@ +/**************************************************************************************** + * \file SHCollisionUtils.cpp + * \author Diren D Bharwani, diren.dbharwani, 390002520 + * \brief Implementation for some objects to assist with collision detection + * + * \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or + * disclosure of this file or its contents without the prior written consent + * of DigiPen Institute of Technology is prohibited. +****************************************************************************************/ + +#include + +// Primary Header +#include "SHCollisionUtils.h" + +namespace SHADE +{ + /*-----------------------------------------------------------------------------------*/ + /* Operator Overload Definitions */ + /*-----------------------------------------------------------------------------------*/ + + SHVec3 SHCollisionUtils::ShapeTransform::operator*(const SHVec3& rhs) const noexcept + { + return SHVec3::Rotate(rhs, orientation) + position; + } + + /*-----------------------------------------------------------------------------------*/ + /* Public Member Functions Definitions */ + /*-----------------------------------------------------------------------------------*/ + + SHCollisionUtils::ShapeTransform SHCollisionUtils::ShapeTransform::GetInverse() const noexcept + { + const SHQuaternion INV_ORIENTATION = SHQuaternion::Inverse(orientation); + return ShapeTransform { SHVec3::Rotate(-position, INV_ORIENTATION), INV_ORIENTATION }; + } + + +} // namespace SHADE \ No newline at end of file diff --git a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp index a36fb730..2924acf8 100644 --- a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp +++ b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp @@ -9,6 +9,7 @@ ****************************************************************************************/ #include +#include // Primary Header #include "SHColliderComponent.h" diff --git a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h index 39552949..fb7ae0b0 100644 --- a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h +++ b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h @@ -10,6 +10,8 @@ #pragma once +#include + #include // Project Headers @@ -29,6 +31,7 @@ namespace SHADE /* Friends */ /*---------------------------------------------------------------------------------*/ + friend class SHCollisionShape; friend class SHPhysicsSystem; friend struct SHPhysicsObject; diff --git a/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h b/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h index 1173c1d5..cac515b0 100644 --- a/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h +++ b/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h @@ -17,6 +17,15 @@ #include "Math/Vector/SHVec3.h" #include "Physics/Dynamics/SHRigidBody.h" +/*-------------------------------------------------------------------------------------*/ +/* Forward Declarations */ +/*-------------------------------------------------------------------------------------*/ + +namespace reactphysics3d +{ + class RigidBody; +} + namespace SHADE { /*-----------------------------------------------------------------------------------*/ @@ -141,6 +150,22 @@ namespace SHADE void ClearForces () const noexcept; private: + /*---------------------------------------------------------------------------------*/ + /* Type Definitions */ + /*---------------------------------------------------------------------------------*/ + + enum class Flags : uint8_t + { + GRAVITY = 0x1 + , SLEEPING = 0x2 + , LINEAR_X = 0x4 + , LINEAR_Y = 0x8 + , LINEAR_Z = 0x10 + , ANGULAR_X = 0x20 + , ANGULAR_Y = 0x40 + , ANGULAR_Z = 0x80 + }; + /*---------------------------------------------------------------------------------*/ /* Data Members */ /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h b/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h index 83f96377..211a7829 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h +++ b/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h @@ -151,4 +151,4 @@ namespace SHADE }; -} // namespace SHADE +} // namespace SHADE \ No newline at end of file diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h index 712727ec..b4a6b62e 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h @@ -39,8 +39,12 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ friend class SHPhysicsDebugDrawSystem; + friend class SHCollisionListener; + friend class SHRaycaster; public: + + /*---------------------------------------------------------------------------------*/ /* Constructors & Destructor */ /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h b/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h index 8a1f6be8..a9542352 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h @@ -17,7 +17,6 @@ of DigiPen Institute of Technology is prohibited. #include "Physics/Collision/SHCollisionSpace.h" #include "Physics/Collision/Contacts/SHCollisionEvents.h" - namespace SHADE { /*-----------------------------------------------------------------------------------*/ @@ -29,7 +28,6 @@ namespace SHADE struct SHPhysicsRaycastResult; struct SHCollisionSpace::RaycastInfo; - /*-----------------------------------------------------------------------------------*/ /* Type Definitions */ /*-----------------------------------------------------------------------------------*/ @@ -39,7 +37,49 @@ namespace SHADE /// class SH_API SHPhysicsSystemInterface final { + public: + + struct RaycastInfo + { + private: + /*-------------------------------------------------------------------------------*/ + /* Friends */ + /*-------------------------------------------------------------------------------*/ + + friend class SHPhysicsSystemInterface; + public: + /*-------------------------------------------------------------------------------*/ + /* Data Members */ + /*-------------------------------------------------------------------------------*/ + + bool continuous = false; + uint16_t layers = static_cast(SHCollisionTag::Layer::ALL); + float distance = std::numeric_limits::infinity(); + SHRay ray; + + /*-------------------------------------------------------------------------------*/ + /* Setter Functions */ + /*-------------------------------------------------------------------------------*/ + + /** + * @brief + * Sets the collider ID for the raycast. Setting this specifies that the ray + * should ignore this collider. + * @param eid + * The entity ID of the collider. + */ + void SetColliderID(EntityID eid) noexcept { colliderEntityID = eid; } + + private: + /*-------------------------------------------------------------------------------*/ + /* Data Members */ + /*-------------------------------------------------------------------------------*/ + + std::optional colliderEntityID; + }; + + /*---------------------------------------------------------------------------------*/ /* Constructor */ /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Managed/src/Audio/Audio.cxx b/SHADE_Managed/src/Audio/Audio.cxx index c3994cd4..33cfdd83 100644 --- a/SHADE_Managed/src/Audio/Audio.cxx +++ b/SHADE_Managed/src/Audio/Audio.cxx @@ -124,6 +124,12 @@ namespace SHADE audioSys->SetParameter(Convert::ToNative(path).data(), value); } + void Audio::SetParameterWithLabel(System::String^ path, System::String^ label) + { + auto audioSys = SHSystemManager::GetSystem(); + audioSys->SetParameterWithLabel(Convert::ToNative(path).data(), Convert::ToNative(label).data()); + } + AudioClipHandler Audio::CreateAudioClip(System::String^ path) { auto audioSys = SHSystemManager::GetSystem(); diff --git a/SHADE_Managed/src/Audio/Audio.hxx b/SHADE_Managed/src/Audio/Audio.hxx index 179a3eb7..fa1e97de 100644 --- a/SHADE_Managed/src/Audio/Audio.hxx +++ b/SHADE_Managed/src/Audio/Audio.hxx @@ -105,6 +105,7 @@ namespace SHADE static void SetVCAVolume(System::String^ path, float volume); static float GetParameterValue(System::String^ path); static void SetParameter(System::String^ path, float value); + static void SetParameterWithLabel(System::String^ path, System::String^ label); //to comment ltr static AudioClipHandler CreateAudioClip(System::String^ path); diff --git a/SHADE_Managed/src/Audio/AudioClip.cxx b/SHADE_Managed/src/Audio/AudioClip.cxx index 7ed58714..062b543e 100644 --- a/SHADE_Managed/src/Audio/AudioClip.cxx +++ b/SHADE_Managed/src/Audio/AudioClip.cxx @@ -79,6 +79,11 @@ namespace SHADE NativeObject->SetParameter(Convert::ToNative(paramName).data(), value); } + void AudioClipHandler::SetParameterWithLabel(System::String^ paramName, System::String^ label) + { + NativeObject->SetParameterWithLabel(Convert::ToNative(paramName).data(), Convert::ToNative(label).data()); + } + float AudioClipHandler::GetParameterValue(System::String^ paramName) { return NativeObject->GetParameterValue(Convert::ToNative(paramName).data()); diff --git a/SHADE_Managed/src/Audio/AudioClip.hxx b/SHADE_Managed/src/Audio/AudioClip.hxx index 34e9b4a5..317c5bad 100644 --- a/SHADE_Managed/src/Audio/AudioClip.hxx +++ b/SHADE_Managed/src/Audio/AudioClip.hxx @@ -71,6 +71,7 @@ namespace SHADE void SetPause(bool pause); bool IsPaused(); void SetParameter(System::String^ paramName, float value); + void SetParameterWithLabel(System::String^ paramName, System::String^ label); float GetParameterValue(System::String^ paramName); float GetVolume(); void SetVolume(float volume); diff --git a/SHADE_Managed/src/Components/Collider.cxx b/SHADE_Managed/src/Components/Collider.cxx index f4b4f09d..b6501951 100644 --- a/SHADE_Managed/src/Components/Collider.cxx +++ b/SHADE_Managed/src/Components/Collider.cxx @@ -4,7 +4,6 @@ \par email: kahwei.tng\@digipen.edu \date Oct 20, 2022 \brief Contains the definition of the functions of the managed Collider class. - Note: This file is written in C++17/CLI. Copyright (C) 2022 DigiPen Institute of Technology. @@ -15,6 +14,9 @@ of DigiPen Institute of Technology is prohibited. #include "SHpch.h" // Primary Header #include "Collider.hxx" + +#include "Physics/Collision/Shapes/SHBox.h" +#include "Physics/Collision/Shapes/SHSphere.h" #include "Utility/Debug.hxx" namespace SHADE @@ -120,7 +122,7 @@ namespace SHADE /* BoxCollider - Constructors */ /*---------------------------------------------------------------------------------*/ BoxCollider::BoxCollider(int arrayIdx, Entity attachedEntity) - : CollisionShape { arrayIndex, attachedEntity } + : CollisionShape { arrayIdx, attachedEntity } {} /*---------------------------------------------------------------------------------*/ @@ -166,11 +168,11 @@ namespace SHADE } float SphereCollider::Radius::get() { - return getNativeCollisionShape().GetWorldRadius(); + return getNativeCollisionShape().GetWorldRadius(); } void SphereCollider::Radius::set(float value) { - getNativeCollisionShape().SetWorldRadius(value); + getNativeCollisionShape().SetWorldRadius(value); } /*---------------------------------------------------------------------------------*/ @@ -307,9 +309,9 @@ namespace SHADE case SHCollisionShape::Type::SPHERE: bound = gcnew SphereCollider(i, Owner.GetEntity()); break; - case SHCollisionShape::Type::CAPSULE: - // TODO - break; + //case SHCollisionShape::Type::CAPSULE: + // // TODO + // break; default: Debug::LogWarning("[Collider] An invalid Collider Type was detected. Skipping."); break; @@ -320,4 +322,4 @@ namespace SHADE subColliderList->Add(bound); } } -} +} \ No newline at end of file diff --git a/SHADE_Managed/src/Components/Collider.hxx b/SHADE_Managed/src/Components/Collider.hxx index 19235571..3c7b060e 100644 --- a/SHADE_Managed/src/Components/Collider.hxx +++ b/SHADE_Managed/src/Components/Collider.hxx @@ -1,7 +1,9 @@ /************************************************************************************//*! \file Collider.hxx \author Tng Kah Wei, kahwei.tng, 390009620 + Diren D Bharwani, diren.dbharwani, 390002520 \par email: kahwei.tng\@digipen.edu + email: diren.dbharwani\@digipen.edu \date Oct 20, 2022 \brief Contains the definition of the managed Collider class with the declaration of functions for working with it.