From 4af3440db71112dad3c8555161ff658b7e80a412 Mon Sep 17 00:00:00 2001 From: Glence Date: Thu, 2 Feb 2023 22:44:30 +0800 Subject: [PATCH 01/12] added gameplay for level1 and multiplier combo is done --- Assets/Scenes/Level1Scene.shade | 2307 ++++++++++++++++- Assets/Scenes/MainGame.shade | 26 +- Assets/Scripts/FixRotation.cs | 19 + Assets/Scripts/FixRotation.cs.shmeta | 3 + Assets/Scripts/Gameplay/Item/SC_Breakable.cs | 7 +- .../Gameplay/Player/SC_PlayerController.cs | 2 +- Assets/Scripts/Gameplay/SC_GameManager.cs | 46 +- Assets/Scripts/Gameplay/SC_ScoringZone.cs | 4 +- 8 files changed, 2282 insertions(+), 132 deletions(-) create mode 100644 Assets/Scripts/FixRotation.cs create mode 100644 Assets/Scripts/FixRotation.cs.shmeta diff --git a/Assets/Scenes/Level1Scene.shade b/Assets/Scenes/Level1Scene.shade index ec97b59f..e6134eae 100644 --- a/Assets/Scenes/Level1Scene.shade +++ b/Assets/Scenes/Level1Scene.shade @@ -43,6 +43,18 @@ Mesh: 141180771 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.20000005, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.474999994, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 40 Name: tableTop @@ -51,13 +63,25 @@ Components: Transform Component: Translate: {x: 4, y: 0, z: -0.649999976} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999741554, y: 0.800000012, z: 0.999741554} IsActive: true Renderable Component: Mesh: 141180771 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.20000005, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.474999994, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 39 Name: tableTop @@ -66,13 +90,25 @@ Components: Transform Component: Translate: {x: 3.64590621, y: 0, z: -9.42525005} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1.44297516, y: 0.800000012, z: 0.999741554} IsActive: true Renderable Component: Mesh: 141180771 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.20000005, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.474999994, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 38 Name: Sink @@ -81,13 +117,70 @@ Components: Transform Component: Translate: {x: -5.35824203, y: -0.25, z: -9.39999962} - Rotate: {x: 0, y: -1.57079601, z: 0} - Scale: {x: 0.999681234, y: 1, z: 0.999681234} + Rotate: {x: -0, y: -1.57079601, z: 0} + Scale: {x: 0.999681175, y: 1, z: 0.999681175} IsActive: true Renderable Component: Mesh: 141816633 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.899999976, y: 0.100000001, z: 0.899999976} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.850000024, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.899999976, y: 0.300000012, z: 0.100000001} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.04999995, z: 0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.899999976, y: 0.300000012, z: 0.100000001} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.04999995, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 0.300000012, z: 0.899999976} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.04999995, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 0.300000012, z: 0.899999976} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.449999988, y: 1.04999995, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + 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.550000012, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 30 Name: tableTop @@ -118,6 +211,18 @@ Mesh: 141180771 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.20000005, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.474999994, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 67 Name: tableTop @@ -133,6 +238,18 @@ Mesh: 141180771 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 3, y: 1.20000005, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -1, y: 0.349999994, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65 Name: washingMachine @@ -148,6 +265,18 @@ Mesh: 138744683 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.14999998, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 66 Name: washingMachineDoor @@ -171,13 +300,70 @@ Components: Transform Component: Translate: {x: 1.93640828, y: -0.25, z: -0.649999976} - Rotate: {x: 0, y: 1.57079601, z: 0} - Scale: {x: 0.999696851, y: 1, z: 0.999696851} + Rotate: {x: -0, y: 1.57079601, z: -0} + Scale: {x: 0.999696791, y: 1, z: 0.999696791} IsActive: true Renderable Component: Mesh: 141816633 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.899999976, y: 0.100000001, z: 0.899999976} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.850000024, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.899999976, y: 0.300000012, z: 0.100000001} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.04999995, z: 0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.899999976, y: 0.300000012, z: 0.100000001} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.04999995, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 0.300000012, z: 0.899999976} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.04999995, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 0.300000012, z: 0.899999976} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.449999988, y: 1.04999995, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + 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.550000012, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 57 Name: tableTop @@ -186,13 +372,25 @@ Components: Transform Component: Translate: {x: 5, y: 0, z: -0.751354992} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999741554, y: 0.800000012, z: 1.20710659} IsActive: true Renderable Component: Mesh: 141180771 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.20000005, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.474999994, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 43 Name: washingMachine @@ -208,6 +406,18 @@ Mesh: 138744683 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.14999998, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 44 Name: washingMachineDoor @@ -231,13 +441,25 @@ Components: Transform Component: Translate: {x: 4.95315123, y: 0, z: -3.381464} - Rotate: {x: 0, y: -3.1415925, z: 0} + Rotate: {x: -0, y: -3.1415925, z: 0} Scale: {x: 0.800000012, y: 0.800000012, z: 0.800000012} IsActive: true Renderable Component: Mesh: 138744683 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.14999998, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 131081 Name: washingMachineDoor @@ -246,8 +468,8 @@ Components: Transform Component: Translate: {x: 0.51047945, y: 0.642518938, z: 0.365010053} - Rotate: {x: 0, y: 1.57079649, z: 0} - Scale: {x: 0.999917805, y: 1, z: 0.999917805} + Rotate: {x: -0, y: 1.57079649, z: 0} + Scale: {x: 0.999917746, y: 1, z: 0.999917746} IsActive: true Renderable Component: Mesh: 139502794 @@ -294,6 +516,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 56 Name: Shelf @@ -309,6 +579,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 55 Name: Shelf @@ -324,6 +642,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65559 Name: Shelf @@ -339,6 +705,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 131094 Name: Shelf @@ -354,6 +768,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 29 Name: Shelf @@ -369,6 +831,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65548 Name: Shelf @@ -384,6 +894,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65546 Name: Shelf @@ -399,6 +957,54 @@ Mesh: 141619727 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.0299999993, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.985000014, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.47500002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.97000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65618 Name: BoxMaster @@ -418,13 +1024,25 @@ Components: Transform Component: Translate: {x: -4.85673237, y: 0, z: -3.41360497} - Rotate: {x: 0, y: -1.57079601, z: 0} - Scale: {x: 1.25, y: 1.25, z: 1.25} + Rotate: {x: -0, y: -1.57079601, z: 0} + Scale: {x: 1.24999988, y: 1.25, z: 1.24999988} IsActive: true Renderable Component: Mesh: 139750047 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.400000006, y: 0.5, z: 0.400000006} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.25, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 77 Name: box @@ -440,6 +1058,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.419999987, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 76 Name: box @@ -448,13 +1078,25 @@ Components: Transform Component: Translate: {x: 4.13454485, y: 2.38418579e-07, z: -1.58559704} - Rotate: {x: 0, y: -0.855899215, z: 0} + Rotate: {x: -0, y: -0.855899215, z: 0} Scale: {x: 1.24992537, y: 1.25, z: 1.24992537} IsActive: true Renderable Component: Mesh: 139750047 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.400000006, y: 0.5, z: 0.400000006} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.25, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 75 Name: box @@ -463,13 +1105,25 @@ Components: Transform Component: Translate: {x: -3.44867873, y: 0, z: -3.41360497} - Rotate: {x: 0, y: -1.57079601, z: 0} - Scale: {x: 1.70944798, y: 1.71000004, z: 1.70944798} + Rotate: {x: -0, y: -1.57079601, z: 0} + Scale: {x: 1.70944786, y: 1.71000004, z: 1.70944786} IsActive: true Renderable Component: Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.400000006, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 73 Name: box @@ -485,6 +1139,18 @@ Mesh: 149524108 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 72 Name: box @@ -500,6 +1166,18 @@ Mesh: 149524108 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 71 Name: box @@ -515,6 +1193,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.159999996, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 70 Name: box @@ -530,6 +1220,18 @@ Mesh: 149524108 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.699999988, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 69 Name: box @@ -545,6 +1247,18 @@ Mesh: 149524108 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.25, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 63 Name: box @@ -560,6 +1274,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.219999999, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 62 Name: box @@ -575,6 +1301,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.270000011, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 61 Name: box @@ -590,6 +1328,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.400000006, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 60 Name: box @@ -605,6 +1355,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.550000012, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 59 Name: box @@ -620,6 +1382,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.419999987, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 58 Name: box @@ -635,6 +1409,18 @@ Mesh: 139750047 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.400000006, y: 0.5, z: 0.400000006} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.25, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 34 Name: box @@ -650,6 +1436,18 @@ Mesh: 149524108 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.25, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 33 Name: box @@ -665,6 +1463,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.170000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 32 Name: box @@ -680,6 +1490,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.280000001, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 31 Name: box @@ -695,6 +1517,18 @@ Mesh: 149524108 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.449999988, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 24 Name: box @@ -710,6 +1544,18 @@ Mesh: 137072050 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + 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.200000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 81 Name: WallsMaster @@ -736,6 +1582,18 @@ Mesh: 147863396 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 79 Name: Wall @@ -751,6 +1609,18 @@ Mesh: 147863396 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65589 Name: WallCorner @@ -759,13 +1629,34 @@ Components: Transform Component: Translate: {x: -9.5, y: 0, z: -10} - Rotate: {x: 0, y: -1.57079601, z: 0} - Scale: {x: 0.999981344, y: 1, z: 0.999981344} + Rotate: {x: -0, y: -1.57079601, z: 0} + Scale: {x: 0.999981284, y: 1, z: 0.999981284} IsActive: true Renderable Component: Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 131083 Name: WallCorner @@ -781,6 +1672,27 @@ Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65604 Name: WallCorner @@ -796,6 +1708,27 @@ Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65588 Name: WallCorner @@ -804,13 +1737,34 @@ Components: Transform Component: Translate: {x: 5.5, y: 0, z: -10} - Rotate: {x: 0, y: -3.1415925, z: 0} + Rotate: {x: -0, y: -3.1415925, z: 0} Scale: {x: 0.999977052, y: 1, z: 0.999977052} IsActive: true Renderable Component: Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 54 Name: Wall @@ -819,13 +1773,52 @@ Components: Transform Component: Translate: {x: 2, y: 0, z: -10} - Rotate: {x: 0, y: 3.14159274, z: 0} - Scale: {x: 0.999978602, y: 1, z: 0.999978602} + Rotate: {x: -0, y: -3.1415925, z: 0} + Scale: {x: 0.999978125, y: 1, z: 0.999978125} IsActive: true Renderable Component: Mesh: 149786048 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 0.200000003, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 2.0999999, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 0.899999976, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.449999988, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 50 Name: Wall @@ -841,6 +1834,45 @@ Mesh: 138781993 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.200000003, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 2.0999999, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.899999976, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.449999988, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 49 Name: Wall @@ -856,6 +1888,45 @@ Mesh: 138781993 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.200000003, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 2.0999999, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.899999976, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.449999988, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 48 Name: Wall @@ -864,13 +1935,25 @@ Components: Transform Component: Translate: {x: 5.5, y: 0, z: -2} - Rotate: {x: 0, y: 1.57079601, z: 0} - Scale: {x: 0.999951959, y: 1, z: 0.999951959} + Rotate: {x: -0, y: 1.57079601, z: -0} + Scale: {x: 0.999951839, y: 1, z: 0.999951839} IsActive: true Renderable Component: Mesh: 148351779 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 47 Name: Wall @@ -886,6 +1969,45 @@ Mesh: 138781993 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.200000003, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 2.0999999, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.899999976, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.449999988, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 51 Name: WallCorner @@ -901,6 +2023,27 @@ Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65543 Name: WallCorner @@ -909,13 +2052,34 @@ Components: Transform Component: Translate: {x: -2.5, y: 0, z: -8} - Rotate: {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: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 46 Name: Wall @@ -931,6 +2095,18 @@ Mesh: 140834166 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 45 Name: Wall @@ -939,13 +2115,25 @@ Components: Transform Component: Translate: {x: -3.5, y: 0, z: -3} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999978602, y: 1, z: 0.999978602} IsActive: true Renderable Component: Mesh: 142689599 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 37 Name: Wall @@ -961,6 +2149,18 @@ Mesh: 142689599 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 26 Name: Wall @@ -969,13 +2169,25 @@ Components: Transform Component: Translate: {x: -5.5, y: 0, z: -10} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999978602, y: 1, z: 0.999978602} IsActive: true Renderable Component: Mesh: 142689599 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 25 Name: Wall @@ -984,13 +2196,25 @@ Components: Transform Component: Translate: {x: -7.5, y: 0, z: -10} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999978602, y: 1, z: 0.999978602} IsActive: true Renderable Component: Mesh: 142689599 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 131090 Name: Wall @@ -1006,6 +2230,45 @@ Mesh: 138781993 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.200000003, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 2.0999999, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 0.899999976, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.449999988, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.100000001, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.899999976, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 21 Name: GarageDoor @@ -1014,13 +2277,25 @@ Components: Transform Component: Translate: {x: -9.49340343, y: 0, z: -6.48306847} - Rotate: {x: 0, y: 1.57079601, z: 0} - Scale: {x: 1.49332035, y: 1, z: 0.432201624} + Rotate: {x: -0, y: 1.57079601, z: -0} + Scale: {x: 1.49332023, y: 1, z: 0.432201594} IsActive: true Renderable Component: Mesh: 148373587 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 20 Name: WallCorner @@ -1036,6 +2311,27 @@ Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 16 Name: WallCorner @@ -1044,13 +2340,34 @@ Components: Transform Component: Translate: {x: -9.5, y: 0, z: -3} - Rotate: {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: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 19 Name: Wall @@ -1059,13 +2376,25 @@ Components: Transform Component: Translate: {x: -9.5, y: 0, z: -4.5} - Rotate: {x: 0, y: 1.57079601, z: 0} - Scale: {x: 0.999944031, y: 1, z: 0.999944031} + Rotate: {x: -0, y: 1.57079601, z: -0} + Scale: {x: 0.999943912, y: 1, z: 0.999943912} IsActive: true Renderable Component: Mesh: 139594893 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 17 Name: Wall @@ -1074,13 +2403,25 @@ Components: Transform Component: Translate: {x: 1, y: 0, z: -10} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999978602, y: 1, z: 0.999978602} IsActive: true Renderable Component: Mesh: 147863396 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65551 Name: Wall @@ -1089,13 +2430,25 @@ Components: Transform Component: Translate: {x: -9.5, y: 0, z: -8.5} - Rotate: {x: 0, y: -1.57079601, z: 0} - Scale: {x: 0.999919295, y: 1, z: 0.999919295} + Rotate: {x: -0, y: -1.57079601, z: 0} + Scale: {x: 0.999919236, y: 1, z: 0.999919236} IsActive: true Renderable Component: Mesh: 139594893 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 14 Name: Wall @@ -1111,6 +2464,18 @@ Mesh: 142689599 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 13 Name: Wall @@ -1119,13 +2484,25 @@ Components: Transform Component: Translate: {x: 5.5, y: 0, z: -8} - Rotate: {x: 0, y: 1.57079601, z: 0} - Scale: {x: 0.999920011, y: 1, z: 0.999920011} + Rotate: {x: -0, y: 1.57079601, z: -0} + Scale: {x: 0.999919832, y: 1, z: 0.999919832} IsActive: true Renderable Component: Mesh: 148351779 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 2, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 6 Name: WallCorner @@ -1141,6 +2518,27 @@ Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 4 Name: WallCorner @@ -1156,9 +2554,30 @@ Mesh: 134714737 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.10000002, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.449999988, y: 1.10000002, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.25, y: 2.20000005, z: 1.10000002} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.10000002, z: -0.449999988} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 0 - Name: Default + Name: THISFKINGGHOSTLASTCHANCE IsActive: true NumberOfChildren: 1 Components: @@ -1171,7 +2590,9 @@ Mesh: 150924328 Material: 132690168 IsActive: true - Scripts: ~ + Scripts: + - Type: FixRotation + Enabled: true - EID: 2 Name: DoorFrame IsActive: true @@ -1179,8 +2600,8 @@ Components: Transform Component: Translate: {x: 0, y: 0, z: 0} - Rotate: {x: 0, y: -3.7252903e-09, z: 0} - Scale: {x: 1, y: 0.999999881, z: 0.999999762} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: Mesh: 146862321 @@ -1193,14 +2614,26 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -0.38538447, y: 0, z: 0.101399139} - Rotate: {x: -0, y: 0, z: 0} + Translate: {x: -0.3853845, y: 0, z: 0.101399124} + Rotate: {x: 0, y: 0, z: 0} Scale: {x: 0.999992847, y: 1, z: 0.999992847} IsActive: true Renderable Component: Mesh: 147152385 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.400000006, y: 1, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 65563 Name: WallDoorHole @@ -1238,14 +2671,26 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -0.3853845, y: 0, z: 0.101399124} - Rotate: {x: 0, y: 3.14159274, z: 0} - Scale: {x: 0.999992847, y: 1, z: 0.999992847} + Translate: {x: -0.38538456, y: 0, z: 0.101399854} + Rotate: {x: -0, y: -3.1415925, z: 0} + Scale: {x: 0.999992371, y: 1, z: 0.999992371} IsActive: true Renderable Component: Mesh: 147152385 Material: 132690168 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0.400000006, y: 1, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 8 Name: CarBody @@ -1261,6 +2706,27 @@ Mesh: 135736753 Material: 131956078 IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.79999995, y: 1, z: 4} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.550000012, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.79999995, y: 1, z: 2.70000005} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1.5, z: -0.600000024} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true Scripts: ~ - EID: 141 Name: SkyDome @@ -1269,7 +2735,7 @@ Components: Transform Component: Translate: {x: 0, y: 0, z: 0} - Rotate: {x: -0, y: 0, z: -0} + Rotate: {x: 0, y: 0, z: 0} Scale: {x: 46.7948341, y: 46.7948341, z: 46.7948341} IsActive: true Renderable Component: @@ -2026,7 +3492,7 @@ - EID: 142 Name: FloorMaster IsActive: true - NumberOfChildren: 49 + NumberOfChildren: 50 Components: Transform Component: Translate: {x: 0, y: 0, z: 0} @@ -2769,85 +4235,13 @@ Material: 132690168 IsActive: true Scripts: ~ -- EID: 136 - Name: REPLACE_ME - IsActive: true - NumberOfChildren: 4 - Components: ~ - Scripts: ~ -- EID: 137 - Name: Food_Cheese +- EID: 226 + Name: FloorCollision IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 3.25, y: 1.059461, z: -0.5} - 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: 138 - Name: Food_Apple - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -2.5, y: 0.809460998, z: -5} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1.5, y: 1.5, z: 1.5} - IsActive: true - Renderable Component: - Mesh: 144128170 - Material: 131956078 - IsActive: true - Scripts: ~ -- EID: 139 - Name: Food_Meat - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 3.75, y: 1.309461, z: -9.25} - 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: ~ -- EID: 140 - Name: RaccoonSpawnLoc - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -7.75, y: 0.936967731, z: -4} - Rotate: {x: 0, y: 1.57079601, z: 0} - Scale: {x: 0.999982595, y: 1, z: 0.999982595} - IsActive: true - Renderable Component: - Mesh: 149697411 - Material: 128805346 - IsActive: true - Scripts: ~ -- EID: 196800 - Name: Colliders - IsActive: true - NumberOfChildren: 1 - Components: ~ - Scripts: ~ -- EID: 262337 - Name: Floor_Collider - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: 0, z: 0} + Translate: {x: -1.74568772, y: 0, z: -5.35919619} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} IsActive: true @@ -2856,11 +4250,676 @@ - Is Trigger: false Collision Tag: 1 Type: Box - Half Extents: {x: 25, y: 0.5, z: 20} + Half Extents: {x: 20, y: 0.100000001, z: 20} 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: ~ \ No newline at end of file + Scripts: ~ +- EID: 198 + Name: ====Raccoon==== + IsActive: true + NumberOfChildren: 2 + Components: ~ + Scripts: ~ +- EID: 197 + Name: Player + IsActive: true + NumberOfChildren: 3 + Components: + Transform Component: + Translate: {x: -8, y: 1, z: -4} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0.999999881, y: 1, z: 0.999999881} + IsActive: true + Renderable Component: + Mesh: 149697411 + Material: 126974645 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 1 + Angular Drag: 0.100000001 + Use Gravity: false + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: true + Freeze Position Z: false + Freeze Rotation X: true + Freeze Rotation Y: true + Freeze Rotation Z: true + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 0.400000006, y: 0.5, z: 0.300000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.25, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: PlayerController + Enabled: true + respawnPoint: 239 + currentState: 0 + maxMoveVel: 3 + moveForce: 50 + sprintMultiplier: 1.5 + rotationFactorPerFrame: 5 + maxJumpHeight: 2 + maxJumpTime: 0.75 + fallMultipler: 3 + lightMultiper: 0.75 + mediumMultiper: 0.5 + heavyMultiper: 0.25 + - Type: PickAndThrow + Enabled: true + throwForce: [8, 10, 8] + cameraArmOffSet: [0, 0.25, 0] + delayTimer: 1 + aimingLength: 0.5 + throwItem: false + rayDistance: 0.5 +- EID: 196 + Name: HoldingPoint + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0.899999976, z: 0.200000286} + Rotate: {x: 0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 195 + Name: PlayerCamera + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + 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: 2.12735963, y: 0.362327784, z: 7.98933029} + Pitch: 0 + Yaw: 360 + Roll: 1.28065994e-06 + Width: 1920 + Height: 1080 + Near: 0.00999999978 + 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} + Camera Collision: true + IsActive: true + Scripts: + - Type: SHADE_Scripting.ThirdPersonCamera + Enabled: true + armLength: 1 + turnSpeedPitch: 0.300000012 + turnSpeedYaw: 0.5 + pitchClamp: 45 + inverseXControls: true + inverseYControls: true +- EID: 194 + Name: PlayerBag + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + 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 + Renderable Component: + Mesh: 144838771 + Material: 123745521 + IsActive: true + Scripts: ~ +- EID: 239 + Name: RespawnPoint + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -8, y: 1, z: -4} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 199 + Name: =====Text==== + IsActive: true + NumberOfChildren: 3 + 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: 238 + Name: Multiplier + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -800, y: 300, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 60, y: 60, z: 60} + IsActive: true + Text Renderer Component: + Text: TEST + Font: 176667660 + IsActive: true + Scripts: ~ +- EID: 236 + Name: ====GameManager==== + IsActive: true + NumberOfChildren: 0 + Components: ~ + Scripts: + - Type: GameManager + Enabled: true + winScene: 92009475 + loseScene: 91685359 + currGameState: 0 + totalItemCount: 0 + Score: 0 + timer: 200 + scoreText: 237 + timeText: 206 + multiplierText: 238 + maxMultiplierDuration: 10 + maxMultiplierCombo: 10 + multiplierFont: 60 +- EID: 235 + Name: ====AI===== + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.406909943, y: 0.100000001, z: -2} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 140697366 + Material: 129495479 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: false + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: true + Freeze Rotation Y: false + Freeze Rotation Z: true + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1.79999995, z: 0.400000006} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.899999976, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Homeowner1 + Enabled: true + waypointsPool: 234 + patrolSpeed: 1 + chaseSpeed: 2 + turningSpeed: 5 + sightDistance: 8 + eyeOffset: [0, 1.64999998, 0] + distanceToCapture: 0.5 + captureTime: 0.5 + footstepSFXIntervalMultiplier: 0.5 +- EID: 234 + Name: ====WaypointPool==== + IsActive: true + NumberOfChildren: 4 + Components: ~ + Scripts: ~ +- EID: 233 + Name: 1 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 2.5083437, y: 0, z: -2} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 232 + Name: 2 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.498704284, y: 0, z: -1.87148261} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 231 + Name: 3 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.553169727, y: 0, z: -4.5173068} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 230 + Name: 4 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 1.59207726, y: 0, z: -4.0830121} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 240 + Name: ====ItemPool==== + IsActive: true + NumberOfChildren: 3 + Components: ~ + Scripts: ~ +- EID: 241 + Name: Mesh_Meat + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 3.71994686, y: 1.14058578, z: -9.35119247} + 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 + Collision Tag: 1 + 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: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 1 + dontReturn: false +- EID: 227 + Name: Mesh_Cheese + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 3.22328258, y: 1.08429813, z: -0.57395637} + 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 + Collision Tag: 1 + 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} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 500 + currCategory: 2 + density: 1 + dontReturn: false +- EID: 65778 + Name: Mesh_Apple + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -2.5, y: 0.778462529, z: -5} + 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 + Collision Tag: 1 + 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} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 1 + dontReturn: false +- EID: 229 + Name: ====ScoreZonePool==== + IsActive: true + NumberOfChildren: 5 + Components: ~ + Scripts: ~ +- EID: 228 + Name: ScoreZone + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -7.47360849, y: 1.4327563, z: -2.44241929} + 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 + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.79999995, y: 1, z: 1} + 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: 225 + Name: ScoreZone + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 1.97487497, y: 1.3500793, z: -10.195508} + 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 + Collision Tag: 1 + 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: 224 + Name: ScoreZone + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -5.47656059, y: 1.4327563, z: -2.44241929} + 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 + Collision Tag: 1 + Type: Box + Half Extents: {x: 1.79999995, y: 1, z: 1} + 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: 223 + Name: ScoreZone + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 6.09239721, y: 1.4327563, z: -6.03106117} + 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 + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1.79999995} + 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: 222 + Name: ScoreZone + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 6.09239721, y: 1.4327563, z: -3.94262314} + 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 + Collision Tag: 1 + Type: Box + Half Extents: {x: 1, y: 1, z: 1.79999995} + 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 \ No newline at end of file diff --git a/Assets/Scenes/MainGame.shade b/Assets/Scenes/MainGame.shade index c55d16ca..b91e78b1 100644 --- a/Assets/Scenes/MainGame.shade +++ b/Assets/Scenes/MainGame.shade @@ -8937,6 +8937,7 @@ Enabled: true threshHold: 2 ignoreRaccoon: true + print: true - Type: Item Enabled: true Score: 100 @@ -9223,6 +9224,7 @@ Enabled: true threshHold: 1 ignoreRaccoon: true + print: false - Type: Item Enabled: true Score: 10 @@ -9493,10 +9495,14 @@ timer: 200 scoreText: 237 timeText: 206 + multiplierText: 139 + maxMultiplierDuration: 5 + maxMultiplierCombo: 10 + multiplierFont: 60 - EID: 199 Name: =====Text==== IsActive: true - NumberOfChildren: 2 + NumberOfChildren: 3 Components: ~ Scripts: ~ - EID: 237 @@ -9529,6 +9535,21 @@ Font: 176667660 IsActive: true Scripts: ~ +- EID: 139 + Name: Multiplier + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -800, y: 300, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 60, y: 60, z: 60} + IsActive: true + Text Renderer Component: + Text: TEST + Font: 176667660 + IsActive: true + Scripts: ~ - EID: 198 Name: ====Raccoon==== IsActive: true @@ -9724,6 +9745,7 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false + print: false - EID: 196 Name: Piece1 IsActive: true @@ -9933,6 +9955,7 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false + print: false - EID: 65703 Name: Piece1 IsActive: true @@ -10142,6 +10165,7 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false + print: false - EID: 65708 Name: Piece1 IsActive: true diff --git a/Assets/Scripts/FixRotation.cs b/Assets/Scripts/FixRotation.cs new file mode 100644 index 00000000..37240741 --- /dev/null +++ b/Assets/Scripts/FixRotation.cs @@ -0,0 +1,19 @@ +using System; +using SHADE; + +public class FixRotation : Script +{ + Transform tran; + + protected override void awake() + { + tran = GetComponent(); + } + + protected override void update() + { + if(tran) + tran.LocalEulerAngles = Vector3.Zero; + } +} + diff --git a/Assets/Scripts/FixRotation.cs.shmeta b/Assets/Scripts/FixRotation.cs.shmeta new file mode 100644 index 00000000..abee49a0 --- /dev/null +++ b/Assets/Scripts/FixRotation.cs.shmeta @@ -0,0 +1,3 @@ +Name: FixRotation +ID: 162507316 +Type: 9 diff --git a/Assets/Scripts/Gameplay/Item/SC_Breakable.cs b/Assets/Scripts/Gameplay/Item/SC_Breakable.cs index 964a8b99..19f950a5 100644 --- a/Assets/Scripts/Gameplay/Item/SC_Breakable.cs +++ b/Assets/Scripts/Gameplay/Item/SC_Breakable.cs @@ -12,7 +12,7 @@ public class Breakable : Script private Transform trans; public bool isBreak { get; set; } private List itemPieces = new List(); - private Random ran = new Random(); + public bool print = false; protected override void awake() { @@ -44,7 +44,10 @@ public class Breakable : Script if (ignoreRaccoon && info.GameObject.GetScript()) return; - if (rb.LinearVelocity.GetSqrMagnitude() > threshHold) + if(print) + Debug.Log($"COLLIED {rb.LinearVelocity.GetSqrMagnitude()} with EiD: {info.GameObject.Name}"); + + if (rb.LinearVelocity.GetSqrMagnitude() > threshHold && !info.GameObject.GetScript()) { isBreak = true; if(GameObject.GetScript()) diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 0122a30e..39835b59 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -371,7 +371,7 @@ public class PlayerController : Script stateMachine.SetState(typeof(PlayerIdleState)); tranform.LocalPosition = respawnPoint.GetComponent().LocalPosition; - if (pat && pat.item.GetScript()) + if (pat && pat.item) { holdItem = false; isAiming = false; diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index d6b43a9c..97565c41 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; public class GameManager : Script { public enum GameState - { + { START, WIN, LOSE @@ -26,6 +26,16 @@ public class GameManager : Script public GameObject scoreText; public GameObject timeText; + //mulitpler info + public GameObject multiplierText; + public float maxMultiplierDuration = 5.0f; + public float currMultiplierDuration { get; set; } + public int maxMultiplierCombo = 10; + public bool itemScored {get;set;} + public int currMultiplierCombo { get; set;} + public float multiplierFont = 60.0f; + private Vector3 fontScalar; + public static GameManager Instance { get; private set; } protected override void awake() @@ -40,12 +50,15 @@ public class GameManager : Script totalItemCount = 0; Score = 0; currGameState = GameState.START; + itemScored = false; + currMultiplierCombo = 1; + currMultiplierDuration = 0; + fontScalar = new Vector3(multiplierFont / maxMultiplierDuration, multiplierFont / maxMultiplierDuration , multiplierFont / maxMultiplierDuration); } protected override void update() { Cheats(); - if (currGameState == GameState.START) { timer -= Time.DeltaTimeF; @@ -54,6 +67,25 @@ public class GameManager : Script if(timeText) timeText.GetComponent().Text = $"Time Left: {timer.ToString("0.00")}"; + if (itemScored) + { + multiplierText.GetComponent().Text = $"X {currMultiplierCombo}"; + multiplierText.GetComponent().LocalScale -= fontScalar * Time.DeltaTimeF; + currMultiplierDuration += Time.DeltaTimeF; + + if (currMultiplierDuration >= maxMultiplierDuration) + { + itemScored = false; + currMultiplierCombo = 1; + currMultiplierDuration = 0; + } + + } + else + { + multiplierText.GetComponent().LocalScale = Vector3.Zero; + } + if ((timer > 0 && totalItemCount < 0) || Input.GetKeyDown(Input.KeyCode.F1)) { currGameState = GameState.WIN; @@ -85,5 +117,15 @@ public class GameManager : Script SceneManager.ChangeScene(97158628); } } + + public void ItemScored() + { + totalItemCount -= 1; + itemScored = true; + currMultiplierDuration = 0; + multiplierText.GetComponent().LocalScale = new Vector3(multiplierFont, multiplierFont, multiplierFont); + if (currMultiplierCombo < maxMultiplierCombo) + currMultiplierCombo += 1; + } } diff --git a/Assets/Scripts/Gameplay/SC_ScoringZone.cs b/Assets/Scripts/Gameplay/SC_ScoringZone.cs index 5a3aff64..7697c98f 100644 --- a/Assets/Scripts/Gameplay/SC_ScoringZone.cs +++ b/Assets/Scripts/Gameplay/SC_ScoringZone.cs @@ -12,8 +12,8 @@ public class ScoringZone : Script if (GameManager.Instance && info.GameObject.GetScript()) { Audio.PlaySFXOnce2D("event:/Music/stingers/item_scored"); - GameManager.Instance.Score += info.GameObject.GetScript().Score; - GameManager.Instance.totalItemCount -= 1; + GameManager.Instance.ItemScored(); + GameManager.Instance.Score += info.GameObject.GetScript().Score * GameManager.Instance.currMultiplierCombo; info.GameObject.SetActive(false); } } From 5bf3af2ed2ba36417bc75fe98f1f710d4a5e5f8b Mon Sep 17 00:00:00 2001 From: Glence Date: Fri, 3 Feb 2023 00:03:05 +0800 Subject: [PATCH 02/12] corrected transition to diff scenes --- Assets/Scenes/Level1Scene.shade | 2 +- Assets/Scenes/MainMenu.shade | 3 ++- Assets/Scripts/UI/SC_MainMenu.cs | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Scenes/Level1Scene.shade b/Assets/Scenes/Level1Scene.shade index e6134eae..87f30216 100644 --- a/Assets/Scenes/Level1Scene.shade +++ b/Assets/Scenes/Level1Scene.shade @@ -4461,7 +4461,7 @@ Scripts: - Type: GameManager Enabled: true - winScene: 92009475 + winScene: 86098106 loseScene: 91685359 currGameState: 0 totalItemCount: 0 diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 9e6be582..b5837b9a 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -66,4 +66,5 @@ Components: ~ Scripts: - Type: MainMenu - Enabled: true \ No newline at end of file + Enabled: true + sceneID: 96668835 \ No newline at end of file diff --git a/Assets/Scripts/UI/SC_MainMenu.cs b/Assets/Scripts/UI/SC_MainMenu.cs index 4f9320ee..067e4104 100644 --- a/Assets/Scripts/UI/SC_MainMenu.cs +++ b/Assets/Scripts/UI/SC_MainMenu.cs @@ -3,6 +3,7 @@ using SHADE; public class MainMenu : Script { + public uint sceneID; protected override void awake() { Audio.PlayBGMOnce2D("event:/Music/main_menu"); @@ -17,7 +18,7 @@ public class MainMenu : Script if (Input.GetKeyUp(Input.KeyCode.Space)) { Audio.PlaySFXOnce2D("event:/UI/success"); - SceneManager.ChangeScene(86098106); + SceneManager.ChangeScene(sceneID); Audio.StopAllSounds(); } From 36de32447d435f9cdb1dacae47c7f751c0f94925 Mon Sep 17 00:00:00 2001 From: Diren D Bharwani Date: Fri, 3 Feb 2023 18:40:45 +0800 Subject: [PATCH 03/12] Fixed some bugs with serialisation --- Assets/CollisionTags.SHConfig | 18 ++------------- Assets/Editor/Layouts/UserLayout.ini | 14 +++++------ Assets/Scenes/PhysicsTest.shade | 8 +++---- Assets/Scripts/Tests/PhysicsTestObj.cs | 2 +- .../src/Application/SBApplication.cpp | 2 +- .../Collision/Shapes/SHCollisionShape.cpp | 15 ++++++++++++ .../PhysicsObject/SHPhysicsObjectManager.cpp | 23 +++---------------- .../PhysicsObject/SHPhysicsObjectManager.h | 6 ----- .../Physics/Interface/SHColliderComponent.h | 1 + .../src/Physics/System/SHPhysicsSystem.cpp | 2 +- 10 files changed, 35 insertions(+), 56 deletions(-) diff --git a/Assets/CollisionTags.SHConfig b/Assets/CollisionTags.SHConfig index f29443f5..44cfb2dc 100644 --- a/Assets/CollisionTags.SHConfig +++ b/Assets/CollisionTags.SHConfig @@ -1,16 +1,2 @@ -0 1 3 -1 2 65535 -2 3 65534 -3 4 65534 -4 5 65534 -5 6 65534 -6 7 65534 -7 8 65534 -8 9 65534 -9 10 65534 -10 11 65534 -11 12 65534 -12 13 65534 -13 14 65534 -14 15 65534 -15 16 65534 +0 1 65535 +1 2 65415 diff --git a/Assets/Editor/Layouts/UserLayout.ini b/Assets/Editor/Layouts/UserLayout.ini index 9a8687ca..2c3c4806 100644 --- a/Assets/Editor/Layouts/UserLayout.ini +++ b/Assets/Editor/Layouts/UserLayout.ini @@ -135,20 +135,20 @@ Collapsed=0 Column 0 Weight=0.9945 Column 1 Weight=0.9945 Column 2 Weight=0.9945 -Column 3 Weight=0.9945 -Column 4 Weight=0.9945 +Column 3 Weight=1.0320 +Column 4 Weight=0.9570 Column 5 Weight=0.9945 Column 6 Weight=0.9945 Column 7 Weight=0.9945 Column 8 Weight=0.9945 -Column 9 Weight=0.9945 -Column 10 Weight=0.9945 -Column 11 Weight=0.9945 -Column 12 Weight=1.0132 +Column 9 Weight=1.0320 +Column 10 Weight=0.9570 +Column 11 Weight=1.0133 +Column 12 Weight=0.9945 Column 13 Weight=0.8444 Column 14 Weight=0.9945 Column 15 Weight=1.2009 -Column 16 Weight=1.0132 +Column 16 Weight=1.0133 [Docking][Data] DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=1920,941 Split=X diff --git a/Assets/Scenes/PhysicsTest.shade b/Assets/Scenes/PhysicsTest.shade index 5e3a2986..0b8b971f 100644 --- a/Assets/Scenes/PhysicsTest.shade +++ b/Assets/Scenes/PhysicsTest.shade @@ -13,7 +13,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: false - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -25,7 +25,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 2 Type: Box Half Extents: {x: 1, y: 1, z: 1} Friction: 0.400000006 @@ -52,7 +52,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 5 Type: Box Half Extents: {x: 1, y: 1, z: 1} Friction: 0.400000006 @@ -161,7 +161,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 7 Type: Box Half Extents: {x: 1, y: 1, z: 1} Friction: 0.400000006 diff --git a/Assets/Scripts/Tests/PhysicsTestObj.cs b/Assets/Scripts/Tests/PhysicsTestObj.cs index 82929888..7ea7f774 100644 --- a/Assets/Scripts/Tests/PhysicsTestObj.cs +++ b/Assets/Scripts/Tests/PhysicsTestObj.cs @@ -82,7 +82,7 @@ public class PhysicsTestObj : Script { Ray colliderRay = new Ray(); colliderRay.Direction = Vector3.Right; - Physics.ColliderRaycast(collider.Owner, colliderRay, false, 8); + Physics.ColliderRaycast(collider.Owner, colliderRay, false, (ushort)64); for (int i = 0; i < 6; ++i) { diff --git a/SHADE_Application/src/Application/SBApplication.cpp b/SHADE_Application/src/Application/SBApplication.cpp index e97d9eb4..1d520f7b 100644 --- a/SHADE_Application/src/Application/SBApplication.cpp +++ b/SHADE_Application/src/Application/SBApplication.cpp @@ -5,6 +5,7 @@ //#define SHEDITOR #ifdef SHEDITOR #include "Editor/SHEditor.h" +#include "Physics/System/SHPhysicsDebugDrawSystem.h" //#include "Scenes/SBEditorScene.h" #endif // SHEDITOR @@ -31,7 +32,6 @@ #include "Input/SHInputManager.h" #include "Math/Transform/SHTransformSystem.h" #include "Physics/System/SHPhysicsSystem.h" -#include "Physics/System/SHPhysicsDebugDrawSystem.h" #include "Scripting/SHScriptEngine.h" #include "UI/SHUISystem.h" #include "Animation/SHAnimationSystem.h" diff --git a/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp b/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp index 61dc6516..219c3e47 100644 --- a/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp +++ b/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp @@ -144,7 +144,13 @@ namespace SHADE material.SetDensity(density); if (rp3dCollider) + { rp3dCollider->getMaterial().setMassDensity(material.GetDensity()); + + // Recompute the bodies' mass + dynamic_cast(collider->collisionBody)->updateMassPropertiesFromColliders(); + } + } void SHCollisionShape::SetMaterial(const SHPhysicsMaterial& newMaterial) noexcept @@ -157,6 +163,9 @@ namespace SHADE rp3dMaterial.setFrictionCoefficient(material.GetFriction()); rp3dMaterial.setBounciness(material.GetBounciness()); rp3dMaterial.setMassDensity(material.GetDensity()); + + // Recompute the bodies' mass + dynamic_cast(collider->collisionBody)->updateMassPropertiesFromColliders(); } } @@ -180,7 +189,13 @@ namespace SHADE isTrigger ? flags |= FLAG_VALUE : flags &= ~FLAG_VALUE; if (rp3dCollider) + { rp3dCollider->setIsTrigger(isTrigger); + + // Recompute the bodies' mass + dynamic_cast(collider->collisionBody)->updateMassPropertiesFromColliders(); + } + } /*-----------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.cpp b/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.cpp index 61e5897c..b22741e9 100644 --- a/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.cpp +++ b/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.cpp @@ -210,9 +210,6 @@ namespace SHADE { .entityID = rigidBody->GetEID() , .bodyType = rigidBody->type - , .interpolate = rigidBody->interpolate - , .drag = rigidBody->drag - , .angularDrag = rigidBody->angularDrag }; rigidBodyQueue.push(RIGID_BODY_DEF); @@ -232,22 +229,8 @@ namespace SHADE SHColliderDef::ShapeDef shapeDef { .type = shape->GetType() - , .posOffset = shape->GetPositionOffset() - , .rotOffset = shape->GetRotationOffset() }; - switch (shape->GetType()) - { - case SHCollisionShape::Type::SPHERE: - shapeDef.size.x = dynamic_cast(shape)->GetWorldRadius(); - break; - case SHCollisionShape::Type::BOX: - shapeDef.size = dynamic_cast(shape)->GetWorldExtents(); - break; - default: - break; - } - colliderDef.shapes.emplace_back(shapeDef); } @@ -311,9 +294,9 @@ namespace SHADE rigidBodyComponent->SetFreezeRotationY (rigidBodyComponent->GetFreezeRotationY()); rigidBodyComponent->SetFreezeRotationZ (rigidBodyComponent->GetFreezeRotationZ()); - rigidBodyComponent->SetInterpolate (DEF.interpolate); - rigidBodyComponent->SetDrag (DEF.drag); - rigidBodyComponent->SetAngularDrag (DEF.angularDrag); + rigidBodyComponent->SetInterpolate (rigidBodyComponent->IsInterpolating()); + rigidBodyComponent->SetDrag (rigidBodyComponent->GetDrag()); + rigidBodyComponent->SetAngularDrag (rigidBodyComponent->GetAngularDrag()); rigidBodyQueue.pop(); } diff --git a/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.h b/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.h index 10c8dcfa..747b8839 100644 --- a/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.h +++ b/SHADE_Engine/src/Physics/Interface/PhysicsObject/SHPhysicsObjectManager.h @@ -47,9 +47,6 @@ namespace SHADE { EntityID entityID = MAX_EID; SHRigidBodyComponent::Type bodyType = SHRigidBodyComponent::Type::STATIC; - bool interpolate = true; - float drag = 0.0f; - float angularDrag = 0.0f; }; struct SHColliderDef @@ -57,9 +54,6 @@ namespace SHADE struct ShapeDef { SHCollisionShape::Type type = SHCollisionShape::Type::SPHERE; - SHVec3 posOffset = SHVec3::Zero; - SHVec3 rotOffset = SHVec3::Zero; - SHVec3 size = SHVec3::Zero; // x for sphere radius, all 3 for box extents }; EntityID entityID = MAX_EID; diff --git a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h index 896c1905..9a141964 100644 --- a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h +++ b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h @@ -42,6 +42,7 @@ namespace SHADE /* Friends */ /*---------------------------------------------------------------------------------*/ + friend class SHCollisionShape; friend class SHPhysicsSystem; friend class SHPhysicsObjectManager; diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp index 0a016c6f..ede0ede2 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp @@ -155,7 +155,7 @@ namespace SHADE // Load start and end points into the container for debug drawing #ifdef SHEDITOR - SHVec3 endPos = info.ray.position + info.ray.direction * SHRay::MAX_RAYCAST_DIST; + SHVec3 endPos = info.ray.position + info.ray.direction * std::clamp(info.distance, 0.0f, SHRay::MAX_RAYCAST_DIST); if (!results.empty()) endPos = results.back().position; From 5b2f42a920e7b3e55f9dedf4a4541c2f0a6e6ebe Mon Sep 17 00:00:00 2001 From: SHAM-DP Date: Fri, 3 Feb 2023 19:16:12 +0800 Subject: [PATCH 04/12] Added controls for global parameters Added controls for VCA volume --- .../src/AudioSystem/SHAudioSystem.cpp | 131 ++++++++++++++++-- SHADE_Engine/src/AudioSystem/SHAudioSystem.h | 8 ++ SHADE_Managed/src/Audio/Audio.cxx | 25 ++++ SHADE_Managed/src/Audio/Audio.hxx | 4 + SHADE_Managed/src/Audio/AudioClip.cxx | 8 ++ SHADE_Managed/src/Audio/AudioClip.hxx | 2 + 6 files changed, 164 insertions(+), 14 deletions(-) diff --git a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp index b4330979..a7245123 100644 --- a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp +++ b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp @@ -200,7 +200,9 @@ namespace SHADE void SHAudioSystem::ErrorCheck() const { if (result != FMOD_OK) - std::cerr << "Audio system error: " << FMOD_ErrorString(result) << std::endl; + { + SHLOG_ERROR( "Audio system error: {}", FMOD_ErrorString(result)) + } } void SHAudioSystem::PlayEventOnce(const char* path, bool isSFX, EntityID eid, bool spatial) @@ -319,6 +321,15 @@ namespace SHADE if (channel->isPlaying(&isPlaying) == FMOD_OK && isPlaying) channel->stop(); } + auto [begin, end] = audioClipLibrary.GetDenseAccess(); + for (auto it = begin; it != end; ++it) + { + if (it->instance) + { + it->instance->stop(FMOD_STUDIO_STOP_MODE::FMOD_STUDIO_STOP_IMMEDIATE); + it->instance->release(); + } + } masterGroup->stop(); } @@ -349,6 +360,10 @@ namespace SHADE audioClipHandle = audioClipLibrary.Create(); it->second->createInstance(&audioClipHandle->instance); } + else + { + SHLOG_ERROR("FMOD: Failed to find event path: {}", path) + } return audioClipHandle; } @@ -487,10 +502,12 @@ namespace SHADE } void SHAudioSystem::SetBgmVolume(float const bgmvol) { + bgmVolume = bgmvol; bgmChannelGroup->setVolume(bgmvol); } void SHAudioSystem::SetSfxVolume(float const sfxvol) { + sfxVolume = sfxvol; sfxChannelGroup->setVolume(sfxvol); } void SHAudioSystem::SetMasterVolume(float const mastervol) @@ -506,15 +523,12 @@ namespace SHADE { channel->setPaused(paused); } - for (auto const& event : eventMap) + auto [begin, end] = audioClipLibrary.GetDenseAccess(); + for (auto it = begin; it != end; ++it) { - int instanceCount = 0; - event.second->getInstanceCount(&instanceCount); - std::vector instances(instanceCount); - event.second->getInstanceList(instances.data(), static_cast(instances.size()), &instanceCount); - for (auto const& instance : instances) + if (it->instance) { - instance->setPaused(pause); + it->SetPause(pause); } } } @@ -546,6 +560,7 @@ namespace SHADE bank->loadSampleData(); int numOfEvents; bank->getEventCount(&numOfEvents); + if (numOfEvents > 0) { std::vector events(numOfEvents); @@ -560,11 +575,71 @@ namespace SHADE } } + float SHAudioSystem::GetVCAVolume(const char* path) + { + FMOD::Studio::VCA* vca = nullptr; + result = fmodStudioSystem->getVCA(path, &vca); + float volume = 0.0f; + if (result != FMOD_OK) + { + ErrorCheck(); + return volume; + } + result = vca->getVolume(&volume); + if (result != FMOD_OK) + { + ErrorCheck(); + return volume; + } + return volume; + } + + void SHAudioSystem::SetVCAVolume(const char* path, float value) + { + FMOD::Studio::VCA* vca = nullptr; + result = fmodStudioSystem->getVCA(path, &vca); + if (result != FMOD_OK) + { + ErrorCheck(); + return; + } + result = vca->setVolume(std::clamp(value, 0.0f, 1.0f)); + if (result != FMOD_OK) + { + ErrorCheck(); + return; + } + } + + float SHAudioSystem::GetParameterValue(const char* path) + { + float value = {}; + result = fmodStudioSystem->getParameterByName(path, &value); + if(result != FMOD_OK) + { + ErrorCheck(); + } + return value; + } + + void SHAudioSystem::SetParameter(const char* path, float value) + { + result = fmodStudioSystem->setParameterByName(path, value); + if (result != FMOD_OK) + { + ErrorCheck(); + } + } + void AudioClip::Play() { if(!instance) return; - instance->start(); + FMOD_RESULT result = instance->start(); + if (result != FMOD_OK) + { + SHLOG_ERROR("Audio system error: {}", FMOD_ErrorString(result)) + } } //void AudioClip::Play(bool isSfx) @@ -598,7 +673,11 @@ namespace SHADE { if (!instance) return; - instance->stop(fadeOut ? FMOD_STUDIO_STOP_ALLOWFADEOUT : FMOD_STUDIO_STOP_IMMEDIATE); + FMOD_RESULT result = instance->stop(fadeOut ? FMOD_STUDIO_STOP_ALLOWFADEOUT : FMOD_STUDIO_STOP_IMMEDIATE); + if (result != FMOD_OK) + { + SHLOG_ERROR("Audio system error: {}", FMOD_ErrorString(result)) + } } void AudioClip::SetPause(bool pause) @@ -623,7 +702,11 @@ namespace SHADE { if (!instance) return; - instance->setParameterByName(paramName, value); + FMOD_RESULT result = instance->setParameterByName(paramName, value); + if (result != FMOD_OK) + { + SHLOG_ERROR("Audio system error: {}", FMOD_ErrorString(result)) + } } //void AudioClip::SetParameterLabel(const char* paramName, const char* label) @@ -635,13 +718,33 @@ namespace SHADE float AudioClip::GetParameterValue(const char* paramName) { - if (!instance) - return {}; float value{}; - instance->getParameterByName(paramName, &value); + if (!instance) + return value; + auto result = instance->getParameterByName(paramName, &value); + if (result != FMOD_OK) + { + SHLOG_ERROR("Audio system error: {}", FMOD_ErrorString(result)) + } return value; } + float AudioClip::GetVolume() + { + float volume{}; + if(!instance) + return volume; + instance->getVolume(&volume); + return volume; + } + + void AudioClip::SetVolume(float volume) + { + if(!instance) + return; + instance->setVolume(volume); + } + SHEventHandle SHAudioSystem::onStop(SHEventPtr onStopEvent) { StopAllSounds(); diff --git a/SHADE_Engine/src/AudioSystem/SHAudioSystem.h b/SHADE_Engine/src/AudioSystem/SHAudioSystem.h index 0c12cef4..5714a618 100644 --- a/SHADE_Engine/src/AudioSystem/SHAudioSystem.h +++ b/SHADE_Engine/src/AudioSystem/SHAudioSystem.h @@ -35,6 +35,8 @@ namespace SHADE void SetParameter(const char* paramName, float value); //void SetParameterLabel(const char* paramName, const char* label); float GetParameterValue(const char* paramName); + float GetVolume(); + void SetVolume(float volume); friend class SHAudioSystem; private: FMOD::Studio::EventInstance* instance = nullptr; @@ -85,7 +87,13 @@ namespace SHADE void SetPaused(bool pause); bool GetPaused() const; SHVec3 GetListenerPosition(); + void LoadBank(const char* path); + float GetVCAVolume(const char* path); + void SetVCAVolume(const char* path, float value); + + float GetParameterValue(const char* path); + void SetParameter(const char* path, float value); private: FMOD::Studio::System* fmodStudioSystem; diff --git a/SHADE_Managed/src/Audio/Audio.cxx b/SHADE_Managed/src/Audio/Audio.cxx index 9432886f..c3994cd4 100644 --- a/SHADE_Managed/src/Audio/Audio.cxx +++ b/SHADE_Managed/src/Audio/Audio.cxx @@ -99,6 +99,31 @@ namespace SHADE audioSys->StopAllSounds(); } + float Audio::GetVCAVolume(System::String^ path) + { + auto audioSys = SHSystemManager::GetSystem(); + + return audioSys->GetVCAVolume(Convert::ToNative(path).data()); + } + + void Audio::SetVCAVolume(System::String^ path, float volume) + { + auto audioSys = SHSystemManager::GetSystem(); + audioSys->SetVCAVolume(Convert::ToNative(path).data(), volume); + } + + float Audio::GetParameterValue(System::String^ path) + { + auto audioSys = SHSystemManager::GetSystem(); + return audioSys->GetParameterValue(Convert::ToNative(path).data()); + } + + void Audio::SetParameter(System::String^ path, float value) + { + auto audioSys = SHSystemManager::GetSystem(); + audioSys->SetParameter(Convert::ToNative(path).data(), value); + } + 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 a8c94156..179a3eb7 100644 --- a/SHADE_Managed/src/Audio/Audio.hxx +++ b/SHADE_Managed/src/Audio/Audio.hxx @@ -101,6 +101,10 @@ namespace SHADE /// static void StopAllSounds(); + static float GetVCAVolume(System::String^ path); + static void SetVCAVolume(System::String^ path, float volume); + static float GetParameterValue(System::String^ path); + static void SetParameter(System::String^ path, float value); //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 021a3437..7ed58714 100644 --- a/SHADE_Managed/src/Audio/AudioClip.cxx +++ b/SHADE_Managed/src/Audio/AudioClip.cxx @@ -84,6 +84,14 @@ namespace SHADE return NativeObject->GetParameterValue(Convert::ToNative(paramName).data()); } + float AudioClipHandler::GetVolume() + { + return NativeObject->GetVolume(); + } + void AudioClipHandler::SetVolume(float volume) + { + NativeObject->SetVolume(volume); + } } \ No newline at end of file diff --git a/SHADE_Managed/src/Audio/AudioClip.hxx b/SHADE_Managed/src/Audio/AudioClip.hxx index 09f6a2d1..34e9b4a5 100644 --- a/SHADE_Managed/src/Audio/AudioClip.hxx +++ b/SHADE_Managed/src/Audio/AudioClip.hxx @@ -72,6 +72,8 @@ namespace SHADE bool IsPaused(); void SetParameter(System::String^ paramName, float value); float GetParameterValue(System::String^ paramName); + float GetVolume(); + void SetVolume(float volume); protected: /*-----------------------------------------------------------------------------*/ From c9db8262b76388a9562f48a55bde5be97d4d4fd2 Mon Sep 17 00:00:00 2001 From: Xiao Qi Date: Fri, 3 Feb 2023 19:37:56 +0800 Subject: [PATCH 05/12] Added preprocessor checks for editor --- SHADE_Application/src/Application/SBApplication.cpp | 10 ++++++---- SHADE_Engine/src/ECS_Base/Managers/SHSystemManager.h | 2 +- SHADE_Engine/src/Physics/System/SHPhysicsSystem.h | 5 +---- SHADE_Engine/src/Scripting/SHScriptEngine.cpp | 4 ++-- SHADE_Managed/src/Engine/Application.cxx | 9 ++++++++- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/SHADE_Application/src/Application/SBApplication.cpp b/SHADE_Application/src/Application/SBApplication.cpp index e97d9eb4..ffc4bacc 100644 --- a/SHADE_Application/src/Application/SBApplication.cpp +++ b/SHADE_Application/src/Application/SBApplication.cpp @@ -5,6 +5,7 @@ //#define SHEDITOR #ifdef SHEDITOR #include "Editor/SHEditor.h" +#include "Physics/System/SHPhysicsDebugDrawSystem.h" //#include "Scenes/SBEditorScene.h" #endif // SHEDITOR @@ -31,7 +32,6 @@ #include "Input/SHInputManager.h" #include "Math/Transform/SHTransformSystem.h" #include "Physics/System/SHPhysicsSystem.h" -#include "Physics/System/SHPhysicsDebugDrawSystem.h" #include "Scripting/SHScriptEngine.h" #include "UI/SHUISystem.h" #include "Animation/SHAnimationSystem.h" @@ -74,12 +74,15 @@ namespace Sandbox #endif window.Create(hInstance, hPrevInstance, lpCmdLine, nCmdShow, wndData); + + SHAssetManager::Load(); + // Create Systems SHSystemManager::CreateSystem(); SHSystemManager::CreateSystem(); SHSystemManager::CreateSystem(); -#ifndef _PUBLISH +#ifdef SHEDITOR SHSystemManager::CreateSystem(); #endif @@ -122,7 +125,7 @@ namespace Sandbox SHSystemManager::RegisterRoutine(); SHSystemManager::RegisterRoutine(); -#ifndef _PUBLISH +#ifdef SHEDITOR SHSystemManager::RegisterRoutine(); #endif @@ -155,7 +158,6 @@ namespace Sandbox SHComponentManager::CreateComponentSparseSet(); //SHComponentManager::CreateComponentSparseSet(); - SHAssetManager::Load(); //auto font = SHAssetManager::GetData(176667660); SHSystemManager::RegisterRoutine(); diff --git a/SHADE_Engine/src/ECS_Base/Managers/SHSystemManager.h b/SHADE_Engine/src/ECS_Base/Managers/SHSystemManager.h index 995a1cf5..d02ba3d5 100644 --- a/SHADE_Engine/src/ECS_Base/Managers/SHSystemManager.h +++ b/SHADE_Engine/src/ECS_Base/Managers/SHSystemManager.h @@ -94,7 +94,7 @@ namespace SHADE if (systemContainer.find(id) == systemContainer.end()) { - std::cout << "System Manager error: System Version " << version << " does not exit." << std::endl; + std::cout << "System Manager error: System Version " << typeid(T).name() << ", " << version << " does not exist." << std::endl; return nullptr; } diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h index 312c3625..c80e5d5c 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h @@ -169,11 +169,8 @@ namespace SHADE SHPhysicsObjectManager objectManager; SHCollisionListener collisionListener; SHRaycaster raycaster; - - // For the debug drawer to draw rays - #ifdef SHEDITOR + std::vector raycastHits; - #endif /*---------------------------------------------------------------------------------*/ /* Function Members */ diff --git a/SHADE_Engine/src/Scripting/SHScriptEngine.cpp b/SHADE_Engine/src/Scripting/SHScriptEngine.cpp index 435cb6fb..e6d97f74 100644 --- a/SHADE_Engine/src/Scripting/SHScriptEngine.cpp +++ b/SHADE_Engine/src/Scripting/SHScriptEngine.cpp @@ -62,9 +62,9 @@ namespace SHADE loadFunctions(); // Generate script assembly if it hasn't been before -#ifndef _PUBLISH + #ifndef _PUBLISH BuildScriptAssembly(); -#endif + #endif // Initialise the CSharp Engine csEngineInit(); diff --git a/SHADE_Managed/src/Engine/Application.cxx b/SHADE_Managed/src/Engine/Application.cxx index 06ad632f..5bde66d2 100644 --- a/SHADE_Managed/src/Engine/Application.cxx +++ b/SHADE_Managed/src/Engine/Application.cxx @@ -28,25 +28,32 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ bool Application::IsPlaying::get() { +#ifdef SHEDITOR auto editor = SHSystemManager::GetSystem(); if (editor) return editor->editorState == SHEditor::State::PLAY || editor->editorState == SHEditor::State::PAUSE; +#endif return true; } bool Application::IsPaused::get() { +#ifdef SHEDITOR auto editor = SHSystemManager::GetSystem(); if (editor) return editor->editorState == SHEditor::State::PAUSE; - +#endif return false; } bool Application::IsEditor::get() { +#ifdef SHEDITOR return SHSystemManager::GetSystem() != nullptr; +#else + return false; +#endif } int Application::WindowWidth::get() { From 6cde511b364e3df0b4793994eb561193678a3109 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Fri, 3 Feb 2023 20:16:42 +0800 Subject: [PATCH 06/12] Shadows update Made it less dark --- Assets/Shaders/DeferredComposite_CS.glsl | 2 +- Assets/Shaders/DeferredComposite_CS.shshaderb | Bin 8317 -> 8333 bytes Assets/Shaders/ShadowMap_FS.glsl | 10 ++++++ Assets/Shaders/ShadowMap_FS.shshaderb | Bin 0 -> 365 bytes Assets/Shaders/ShadowMap_FS.shshaderb.shmeta | 3 ++ .../MiddleEnd/Interface/SHGraphicsSystem.cpp | 32 ++++++++++++------ .../MiddleEnd/Interface/SHGraphicsSystem.h | 1 + 7 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 Assets/Shaders/ShadowMap_FS.glsl create mode 100644 Assets/Shaders/ShadowMap_FS.shshaderb create mode 100644 Assets/Shaders/ShadowMap_FS.shshaderb.shmeta diff --git a/Assets/Shaders/DeferredComposite_CS.glsl b/Assets/Shaders/DeferredComposite_CS.glsl index d28eaec0..50a269ac 100644 --- a/Assets/Shaders/DeferredComposite_CS.glsl +++ b/Assets/Shaders/DeferredComposite_CS.glsl @@ -60,7 +60,7 @@ float CalcShadowValue (sampler2D shadowMap, vec4 worldSpaceFragPos, mat4 lightPV if (fragPosLightPOV.z > sampledDepth && fragPosLightPOV.w > 0.0f) { - return 0.0f; + return 0.7f; } else return 1.0f; diff --git a/Assets/Shaders/DeferredComposite_CS.shshaderb b/Assets/Shaders/DeferredComposite_CS.shshaderb index ceca4e13568ca092b20096b7eec9b7c432767466..7f06b4713f034c5c4945e920f736283fcf7fc0df 100644 GIT binary patch literal 8333 zcmZ{n37A%86~`|Ov&bUg3JN$QE~tPaxIqdCI#LiAhE_iDTxLFoFTa^@obMZ4vck}! zO|z^}v$DkuD=k~hvP>=8Y~RbY&8%$CwbXvUd+!;q^E|yi$8*mAocEmbo_pSRJ~}Vy zOtRH7c6NJ`j7i2Plal#ka%^fc79>gJ3*ZxywoLC{y?*ulMzeSRqGOKIbN8f0mf0rb z(~3L}>QAc!;(gE*aIvYGte*R~uy-u-og^AZ_U_diyVtJmUVX~Op25M5jphZl%EnrC zpt7;II#lUtR<~C4>nQnE2YPD5y=8}1Jj(f7iMt0mR;0C_^;^>3`gt4D+Hhq~QLIZuHMLOo%~vE!hivbMCP^gV&0;Ci{W+)Caa!hMJY$Y;RjK2i{2g2Wyqym6gHf7St?;_P$zu zQ(8M?%TOg%1@FlE*jL-wotah*Y_0dC&1!vM)yiU@%^s|tU#YFEZr(iHpi}M}mz)bv zYnv*)^*sJo{pyXXo6q!InO}Qy-e^2KZ@y<+$+n?d(UsV($@UVS_oOx10X9${>Q8IA zr!~A`1Z!mbE=SM$wmQ9_GL+|d+jFp$X*11p>;$)`E9$j6uIz71u7;0%r^3+6EL{s; z&3syu>*3i)SWzDyXg1i@kzv3|F;4Y?w3fM8dmI0`$C)3jR|lGfC2;4oF<1{6@Ak~! z=}-GNRVyPq^15#T&(2unZ^i#6u;nG+_06H-o~F5T8|H`=$Ia?;pLI2wLzRKPd{(SW z+`6ib<;CsD&mnGIJ;ODwPv4rfaSnZJPd))w&YyQV-=ocyX6KInwe;+L ztSzsZw&b7C`_snZN9LFz^sbBt8%&4Ne)gzO9HsB$o<>^d6~o@1OfU44Yr{iBmEKkT zXoTazwq&2*@*(#+v*;`ts=fM!7Iz7GdN_BHe_Wc#n~WiQ*+wcAte+eg{ewY#)? z_sjd$wT~(6-utp$UAy(1Mi%d+Yj(~?F!zi3&BM={#X3rual|G<-9$B>e%9t4HFwma zZf=(`y+YSk&j41B?2i=D17l?achfWqXb7w~c-3`W!V1;|D|bw=w+Oqu(H8?LUWm)@_hJ zai5}A&nnge>F>QNpHtJpUW*%f(?%vF9T<-aMzZ*hiiTN-}L(CuUBYmv)w&qiOkaN$zV zlOlIQ`dh~)xS0N)zX$Gl#I;x8_8`u?8QHz!OR%f=6`1~2WaH`Ycdx@er+doFeDSTk z11^1ysqQ=L3O)M~g>KA?;r}nDc|6B!;VylRp}t*!6}oS$OaIH@p4+pUCsRD}N8C~Ti1QKT_^!JOn{kYL6WqG&^RuyAvNu`VEOz?#-VB-VlW=2; znNQvKS4{iug>1~oe;4wY!hUyQH{UE?0^eKjPULo+oIl{WQ-n;pP;x z4)yyAEb`u8==wiY$mRy0Gq8`NK;NKckp8U}%n~=gx^Jy3_IIGiY)?YA9&2~5 z_SGM`*n*TVeI`TZm{u6|HHW(IvrFCk(G@=EvyttKF|0v(F4z<~*}SX1*J9E#^kX@p z{?_So4ju>b+~(+k_d?E|y6>X@W(wUm)PEa=u6^4meMd?6eqCPD_1{_2jdyiPckZtp zrQci9-Tz=o_Z@z?q#MuQhEd-nbblL$uD`zx)lcMn_Gk;#2VI2jJNAkKJDski$mbLo zED5YuV1!E6;kOCi59zDzBsyy!#mrNO4?*V^y8ir>&3rbo-#O=>IGK<5TBgt094>He zF7x^QjPG~R9`Vmd_Pta${soXVMEnbp^%0NwuS6D?ToK=MIv@9DcB zahElFN5qu9A6FIf)$nTy*?ZyNfG3!M_rkrm@<*xTI{5n`m-Y|9wacw5g?|t-hI4KW zA1bir)U*rvM(75}zYp%w=cADL&G;;Ue++V;_>=gkzYj9M`IKYt$B{i(v z=KC~s3*?!!mGgcEUHd&nzdnm>JniczQCv_0N zCbD&JBVG#s79?i9#?vNNp3mzF+r4o6sO{TuW6Pc0@4~+axwL;Du3a9ve}HU^nB5;D zi^c5z2-(?`>e+M$Z`IOD)-k(C{+5Hu|`D1n;K)w$$pSJs< z*!yeb2cVeU-yj=LJZAT|$l@`(zejdim$u(QV%DV`efR@%)bSAVAEBs2Tb$qT|EIz} zv6!7dqmO}3DQteT2a&~%@1DOvVxj*Pc?WbQ-@Fa}H%K4xiQHqczeC2I1I>fbHdpzwJDSwHdcc@lXi6nE)A$YT1&T@s74{uepUx(oSfD9)dv{pVRwh3Ze#fy*Vq&BpIq48=Wi_a6N;Ibg1kqO&zRcd+e}5)9%MXcZx1kg9N%G2 zbTR#-$6~$_aaOr{+!eXH?}@#TM=$om*IvZ?wKuw0ykFYH-0$1ue%}W7`FG!i7f8&4F2{MGlp|J3t3Fv9vpyd4=yX->`rts{h|kA`q%M0 z5ZQkds8`SrLhggFpuiVd*nV8+1ye49CR^PV22f$aA1cQ*jTXm z?RNy2`}Nnp7+Vi{t=GKTpQ4)MA^%NcFPsuA*IDBq_iMz%?XJNA+^C9=^H~UW>)qk484n zkx-m{A+q?boN)ns5hP~Z8>mn07)abV?>M;2H&6UnNX$7rj3gZd`TosB0av_hl^<{W=|4JoFbKJ8MzrdSrdX z&HZAy%iP+|fW*wD9Jw|io2z^`&qNoG*k>V&#kYw#^60@!kj>*c^f!lfybSKL4t-t< Yy&SR*WqWXTp^KM$;@)StiN2Np1F+75%K!iX literal 8317 zcmZ{n33Odm6^3t`yrgt4V+(CbTZRHikVmW-R8jDtxMB}Re^X+D|5%8@1Rf{)w@=2>{`3FYxRj6dxnNKHkxPGDjRFn z!OF(o>Tso}S=~}GZhRrGI@nVi=`9A7h$z-Ck#}cmtSHxd)^9HN*3aBfu8mX{G!9?1 zbW7jjr2~D77ca$M;=ifLMjErGJd|=BX|HG2hikp-hsr&blZMOv>*|fv*OsoQR_)*1 zT(^PQ?a8k2eObinlwK=eO7?{BsSj?c3^yyi>D=~Y0kTmZ7^+ozS5}6an=#WIJ;?rA zeN(x1>gM4}*>L#r=|1+?Hg=`1RfAjVJ>_P#KDcUSK5qayR6VOwTUqVv8)>jp&TC6t zN4d7C(p%5+j~G{PRGoa9>q_G~k}YHTbiLV}Hx+yvs+BV_$z4je75HpVO38M(!TRt( zxt2xR!-b<y{>a{wd%x_OFM~;4{+)?5z zT?t=JV@k<2$n+zusE-Ub8_XJ?a?nYBoa%$+S{h>S?fmB)&-_rmI@ruT!Fx^{L-nAE z?nvW3{pEp8)yn9MtnX{#(>3PxOT>Q)Zh0YgeRFuEr)llXhdXk`a?`$?XJ3uxaAmMR zJ1h1jZ(r5M^89vW>yWpvo{<{Yr+-bkaR&R=k=zVdte@?2Hbnir|9?83|-t36KV2|{* zfuSvH%FW^GS*W8mO6b{niFJ)n?t>fKb8$cPJ9-N%_w3yd$GigTesm-cjmEw#J^j^l z(yN}H*GKeaJ+m#@C-nZ5Sp4WY<`8;Uc7hu!50|~q+7rjvyE&&(uJelF??`6k_6fC- z;o(Z}s)2HUg{fvwI`K8j!~KHqJW6b%K-0DrauLZOqd)=CCnb2X--+bBr4T_Wlc` zYuyUW75B*)hijE&sY_S>n4e=@p$`MJ!Tf^@!lovYuxGm!H3ZC=;oJo(+QXQw>>V;q#*bI>DxZ*=3$ zpv^?%RKu6xqx*K#5UHwig^d4JEG2^naS^@>^Eh^ElK&U$4A^UZ1*wjwdm%x z|88U_&~M!`vK#1ky_=BsFR#BB>6&AG6?EsyFU7CjmvhE%M(+m3`<(}ouFE;aVZAnB zO@3OX!&q}_dk-98`))eSxfS{Ua$3in=OG-`=#Z&AG^P9k$=e`0I0@dCcoOZC~#5^SN8oH(1{sX5Ngv2{`}L zNbAX2PuuraPXFz>ZqBH`1HC2p-lFVedbwVmhP&Ft3neKf{C?nC-sTIZKY zYs%S&wr`By!o|#TOBdK13S+4By?-r zyXR_mY}c4iLCc0QQ-L-1$eqSoL)-V*p;q6U(rV zWQE4tr^9pb1dQvp#wKJB@a$>(4h|G--%S4&D*F99r)Y04*xs*;3by(D+a%)6cX`3~ z++R7yzPn&M|Dl5IyZcDNHlM!*BmZP z`C1_72<{AYIZ`F-h$|y&z*v39v9s=@oOOKTUI&J9+xTH%%qHf0&i#AJ82PoFKF=n9 z=A^tnhxPn^=J&hkkNp0D>3gYd{+69rj^NHkmoqlF zH{_hXtz&mx&l`dBjn}^f*th3LpM7pco)5O=wtc@D6#Kpa+Zg%i`z`45!V!I&-}9(H z^1l_`H$V2}ZRo}PZ^t%9KJvc1H=q9oya!yI+xGun5c&PL;C;XtdH2hE z`hFnquxIaxoVxepvRuC$c}1>!FRlVlasobx^xi5TqmQeR9|jKnA3^F@+GjWNqre=V zb9?w$&Ml{>>(Orj*8=~2aE>uI0{NSXS%mxqaGv~A#AtsATn((J9&XV9&` zobzG5&w^WkYtmP&`#Eg=cjf!_d35v1-$S_FvJrgG>14?a03YW8^1skLCUj%)0;_42&`N zBS?MG`#;d5_uJ9`38Hs>*8yWEApZsQ$36RZ&dEEhHx3wY5B~wyi+l2D&dH0oCy$|< zOMk5Kar6NYF;AcyCm%6SqF)N)E(QS9u~vOg17l|+p9T8k zygZk4%aAv)?~9NwSbiDstsCbCFg!2%T7aDAMLqgxN6-2w@hgKPC4&&)-XD*DcOJ#*@hZ!-;Df53d6*XeNX zaeRlJvE_`9J(ly0h_x!Ul`W@DFujOLx zhof8PP!MZ>5xV@XtkE}aF_1Iwb@V591d#X5I|}LW&67V8$axObqt?;rV{07)Cx2UB zYbm{sMbMqe*Qx3;|+Zw>ocgLK%3F{^=`eW*W+G_SUN^tBG%`?40qew~6YANI@9J!{eD zdURvtt^Eq5!`k{z1#;F>k6IhhtyR36r(w%S?$gob;@dcQI(H|ZKpvum;|_#Q$br*{RCY&X|Al1P?|l#0@Rjr@X%PD*~}8^{pz2S0R!{slT#L|gy> literal 0 HcmV?d00001 diff --git a/Assets/Shaders/ShadowMap_FS.shshaderb.shmeta b/Assets/Shaders/ShadowMap_FS.shshaderb.shmeta new file mode 100644 index 00000000..902f7f6d --- /dev/null +++ b/Assets/Shaders/ShadowMap_FS.shshaderb.shmeta @@ -0,0 +1,3 @@ +Name: ShadowMap_FS +ID: 45925790 +Type: 2 diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index 6734a77e..99685585 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -128,6 +128,7 @@ namespace SHADE SHFreetypeInstance::Init(); //SHAssetManager::CompileAsset("../../Assets/Shaders/DeferredComposite_CS.glsl", false); + //SHAssetManager::CompileAsset("../../Assets/Shaders/ShadowMap_FS.glsl", false); //SHAssetManager::CompileAsset("../../Assets/Shaders/SSAO_CS.glsl", false); //SHAssetManager::CompileAsset("../../Assets/Shaders/SSAOBlur_CS.glsl", false); //SHAssetManager::CompileAsset("../../Assets/Shaders/PureCopy_CS.glsl", false); @@ -137,6 +138,7 @@ namespace SHADE //SHAssetManager::CompileAsset("../../Assets/Shaders/UI_FS.glsl", false); //SHAssetManager::CompileAsset("../../Assets/Shaders/Text_VS.glsl", false); + // Load Built In Shaders static constexpr AssetID VS_DEFAULT = 39210065; defaultVertShader = SHResourceManager::LoadOrGet(VS_DEFAULT); static constexpr AssetID VS_ANIM = 47911992; animtVertShader = SHResourceManager::LoadOrGet(VS_ANIM); @@ -151,7 +153,8 @@ namespace SHADE static constexpr AssetID TEXT_FS = 38024754; textFS = SHResourceManager::LoadOrGet(TEXT_FS); static constexpr AssetID RENDER_SC_VS = 48082949; renderToSwapchainVS = SHResourceManager::LoadOrGet(RENDER_SC_VS); static constexpr AssetID RENDER_SC_FS = 36869006; renderToSwapchainFS = SHResourceManager::LoadOrGet(RENDER_SC_FS); - static constexpr AssetID SHADOW_MAP_VS = 44646107; shadowMapVS = SHResourceManager::LoadOrGet(SHADOW_MAP_VS); + static constexpr AssetID SHADOW_MAP_VS = 44646107; shadowMapVS = SHResourceManager::LoadOrGet(SHADOW_MAP_VS); + static constexpr AssetID SHADOW_MAP_FS = 45925790; shadowMapFS = SHResourceManager::LoadOrGet(SHADOW_MAP_FS); } @@ -583,14 +586,21 @@ namespace SHADE #endif } - //if (SHInputManager::GetKeyDown(SHInputManager::SH_KEYCODE::B)) - //{ - // auto& lightComps = SHComponentManager::GetDense(); - // for (auto& comp : lightComps) - // { - // comp.SetEnableShadow(true); - // } - //} + static bool shadowAdded = false; + + if (shadowAdded == false/* && SHInputManager::GetKey(SHInputManager::SH_KEYCODE::B)*/) + { + shadowAdded = true; + auto& lightComps = SHComponentManager::GetDense(); + if (lightComps.size() > 2) + { + lightComps[2].SetEnableShadow(true); + } + //for (auto& comp : lightComps) + //{ + // comp.SetEnableShadow(true); + //} + } renderGraph->Begin(frameIndex); auto cmdBuffer = renderGraph->GetCommandBuffer(frameIndex); @@ -809,11 +819,11 @@ namespace SHADE tempLibrary.Init(device); tempLibrary.CreateGraphicsPipelines ( - { shadowMapVS, {} }, shadowMapNode->GetRenderpass(), newSubpass, + { shadowMapVS, shadowMapFS }, shadowMapNode->GetRenderpass(), newSubpass, SHGraphicsPredefinedData::SystemType::BATCHING, SHGraphicsPredefinedData::GetShadowMapViState(), rasterState ); - shadowMapPipeline = tempLibrary.GetGraphicsPipeline({ shadowMapVS, {} }); + shadowMapPipeline = tempLibrary.GetGraphicsPipeline({ shadowMapVS, shadowMapFS }); } newSubpass->SetCompanionSubpass(companionSubpass, shadowMapPipeline); // set companion subpass and pipeline diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h index d72dfcbd..a35065bd 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h @@ -469,6 +469,7 @@ namespace SHADE Handle renderToSwapchainVS; Handle renderToSwapchainFS; Handle shadowMapVS; + Handle shadowMapFS; // Fonts Handle testFont; From 2ee46f33df1f8cd4eeb03402baed49c663c2e213 Mon Sep 17 00:00:00 2001 From: Glence Date: Fri, 3 Feb 2023 21:28:50 +0800 Subject: [PATCH 07/12] update collision tag to have a save button and clamp raycast draw --- Assets/Scripts/Gameplay/Item/SC_Breakable.cs | 4 -- .../Gameplay/Player/SC_PickAndThrow.cs | 47 ++++++++++++------- .../ColliderTagPanel/SHColliderTagPanel.cpp | 23 ++++++++- .../ColliderTagPanel/SHColliderTagPanel.h | 1 + .../RP3DWrapper/SHCollisionListener.cpp | 4 +- .../src/Physics/System/SHPhysicsSystem.cpp | 2 +- 6 files changed, 55 insertions(+), 26 deletions(-) diff --git a/Assets/Scripts/Gameplay/Item/SC_Breakable.cs b/Assets/Scripts/Gameplay/Item/SC_Breakable.cs index 19f950a5..8c792697 100644 --- a/Assets/Scripts/Gameplay/Item/SC_Breakable.cs +++ b/Assets/Scripts/Gameplay/Item/SC_Breakable.cs @@ -12,7 +12,6 @@ public class Breakable : Script private Transform trans; public bool isBreak { get; set; } private List itemPieces = new List(); - public bool print = false; protected override void awake() { @@ -44,9 +43,6 @@ public class Breakable : Script if (ignoreRaccoon && info.GameObject.GetScript()) return; - if(print) - Debug.Log($"COLLIED {rb.LinearVelocity.GetSqrMagnitude()} with EiD: {info.GameObject.Name}"); - if (rb.LinearVelocity.GetSqrMagnitude() > threshHold && !info.GameObject.GetScript()) { isBreak = true; diff --git a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs index f933f9bc..c650f619 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs @@ -200,25 +200,36 @@ public class PickAndThrow : Script { if (pc != null) { - Vector3 dirNor = pc.tranform.Forward; - Vector3 playerRayPos = pc.tranform.GlobalPosition; - playerRayPos.y += 0.05f; - dirNor.Normalise(); - List rayList1 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(22.5f))), rayDistance, false, (ushort)65535); - List rayList2 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(-22.5f))), rayDistance, false, (ushort)65535); - List rayList3 = Physics.Raycast(new Ray(playerRayPos, dirNor), rayDistance * 0.75f, false, (ushort)65535); + Vector3 dirNor = pc.tranform.Forward; + Vector3 playerRayPos = pc.tranform.GlobalPosition; + playerRayPos.y += 0.05f; + dirNor.Normalise(); + List rayList1 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(22.5f))), rayDistance, false, (ushort)65535); + List rayList2 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(-22.5f))), rayDistance, false, (ushort)65535); + List rayList3 = Physics.Raycast(new Ray(playerRayPos, dirNor), rayDistance * 0.75f, false, (ushort)65535); - if (rayList1.Count > 0 && rayList2.Count > 0 && rayList3.Count > 0) - { - RaycastHit ray1 = rayList1[0]; - RaycastHit ray2 = rayList2[0]; - RaycastHit ray3 = rayList3[0]; - inRange = CheckForItem(ray1) || CheckForItem(ray2) || CheckForItem(ray3); - } - else - { - inRange = false; - } + if (rayList1.Count > 0) + { + RaycastHit ray1 = rayList1[0]; + inRange = CheckForItem(ray1); + return; + } + else if (rayList2.Count > 0) + { + RaycastHit ray2 = rayList2[0]; + inRange = CheckForItem(ray2); + return; + } + else if (rayList3.Count > 0) + { + RaycastHit ray3 = rayList3[0]; + inRange = CheckForItem(ray3); + return; + } + else + { + inRange = false; + } } } diff --git a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp index f28e29c5..e40bb643 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp @@ -11,6 +11,7 @@ namespace SHADE { if (Begin()) { + DrawMenuBar(); ImGui::BeginTable("CollisionMtxTable", SHCollisionTag::NUM_LAYERS + 1, ImGuiTableRowFlags_Headers); ImGui::TableNextRow(); ImGui::PushID("CollisionTagNames"); @@ -56,7 +57,10 @@ namespace SHADE if(i == idx) continue; std::string label = std::format("##{} vs {}", tagName, tagName2); - SHEditorWidgets::CheckBox(label, [tag, &idx]{return tag->GetLayerState(idx);}, [tag, i, idx](bool const& value){tag->SetLayerState(idx, value); SHCollisionTagMatrix::GetTag(idx)->SetLayerState(i, value);}, label.substr(2)); + if (SHEditorWidgets::CheckBox(label, [tag, &idx] {return tag->GetLayerState(idx); }, [tag, i, idx](bool const& value) {tag->SetLayerState(idx, value); SHCollisionTagMatrix::GetTag(idx)->SetLayerState(i, value); }, label.substr(2))) + { + isDirty = true; + } } } ImGui::EndTable(); @@ -64,4 +68,21 @@ namespace SHADE ImGui::End(); } + void SHColliderTagPanel::DrawMenuBar() + { + if (ImGui::BeginMenuBar()) + { + ImGui::BeginDisabled(!isDirty); + if (ImGui::Button("Save")) + { + std::filesystem::path defaultCollisionTagNameFilePath{ ASSET_ROOT }; + defaultCollisionTagNameFilePath.append("CollisionTags.SHConfig"); + SHCollisionTagMatrix::Exit(defaultCollisionTagNameFilePath); + isDirty = false; + } + ImGui::EndDisabled(); + ImGui::EndMenuBar(); + } + } + } \ No newline at end of file diff --git a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.h b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.h index 94d17a6d..a0e63f6a 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.h +++ b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.h @@ -14,6 +14,7 @@ namespace SHADE //void Exit(); private: + void DrawMenuBar(); bool isDirty; }; } \ No newline at end of file diff --git a/SHADE_Engine/src/Physics/RP3DWrapper/SHCollisionListener.cpp b/SHADE_Engine/src/Physics/RP3DWrapper/SHCollisionListener.cpp index 98f6bdc1..63970131 100644 --- a/SHADE_Engine/src/Physics/RP3DWrapper/SHCollisionListener.cpp +++ b/SHADE_Engine/src/Physics/RP3DWrapper/SHCollisionListener.cpp @@ -94,8 +94,8 @@ namespace SHADE { const bool CLEAR_EVENT = C_INFO.GetCollisionState() == SHCollisionInfo::State::EXIT || C_INFO.GetCollisionState() == SHCollisionInfo::State::INVALID; - const bool INACTIVE_OBJECT = !SHSceneManager::CheckNodeAndComponentsActive(C_INFO.GetEntityA()) - || !SHSceneManager::CheckNodeAndComponentsActive(C_INFO.GetEntityB()); + const bool INACTIVE_OBJECT = !SHSceneManager::CheckNodeAndHasComponentsActive(C_INFO.GetEntityA()) + || !SHSceneManager::CheckNodeAndHasComponentsActive(C_INFO.GetEntityB()); if (CLEAR_EVENT || INACTIVE_OBJECT) { diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp index 0a016c6f..dd4a1490 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp @@ -155,7 +155,7 @@ namespace SHADE // Load start and end points into the container for debug drawing #ifdef SHEDITOR - SHVec3 endPos = info.ray.position + info.ray.direction * SHRay::MAX_RAYCAST_DIST; + SHVec3 endPos = info.ray.position + info.ray.direction * std::clamp(info.distance,0.0f, SHRay::MAX_RAYCAST_DIST); if (!results.empty()) endPos = results.back().position; From e00b891bf7f3db2050307577ad394ae82650ac82 Mon Sep 17 00:00:00 2001 From: Glence Date: Fri, 3 Feb 2023 22:03:55 +0800 Subject: [PATCH 08/12] added lights to level 2 --- Assets/Scenes/MainGame.shade | 110 ++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 48 deletions(-) diff --git a/Assets/Scenes/MainGame.shade b/Assets/Scenes/MainGame.shade index b91e78b1..6d4d696a 100644 --- a/Assets/Scenes/MainGame.shade +++ b/Assets/Scenes/MainGame.shade @@ -8432,7 +8432,7 @@ - EID: 20 Name: ===== Light ===== IsActive: true - NumberOfChildren: 2 + NumberOfChildren: 3 Components: ~ Scripts: ~ - EID: 296 @@ -8463,6 +8463,25 @@ Strength: 0.699999988 IsActive: true Scripts: ~ +- EID: 65674 + Name: Light_Directional + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 2, y: 1.5, z: -5.5999999} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Light Component: + Position: {x: 2, y: 1.5, z: -5.5999999} + Type: Directional + Direction: {x: 1, y: 0, z: 0} + Color: {x: 0, y: 0, z: 0, w: 1} + Layer: 4294967295 + Strength: 1 + IsActive: true + Scripts: ~ - EID: 240 Name: ====ItemPool==== IsActive: true @@ -8486,7 +8505,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8533,7 +8552,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8580,7 +8599,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8627,7 +8646,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8674,7 +8693,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8721,7 +8740,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8768,7 +8787,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8815,7 +8834,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8862,7 +8881,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8909,7 +8928,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -8937,7 +8956,6 @@ Enabled: true threshHold: 2 ignoreRaccoon: true - print: true - Type: Item Enabled: true Score: 100 @@ -8961,7 +8979,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9008,7 +9026,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9055,7 +9073,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9102,7 +9120,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9149,7 +9167,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9196,7 +9214,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9224,7 +9242,6 @@ Enabled: true threshHold: 1 ignoreRaccoon: true - print: false - Type: Item Enabled: true Score: 10 @@ -9248,7 +9265,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9289,7 +9306,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9330,7 +9347,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9371,7 +9388,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9412,9 +9429,9 @@ Scale: {x: 1, y: 1, z: 1} IsActive: true RigidBody Component: - Type: Static + Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9451,9 +9468,9 @@ Scale: {x: 1, y: 1, z: 1} IsActive: true RigidBody Component: - Type: Static + Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9572,7 +9589,7 @@ IsActive: true RigidBody Component: Type: Dynamic - Drag: 1 + Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: false Interpolate: true @@ -9717,7 +9734,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9745,7 +9762,6 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false - print: false - EID: 196 Name: Piece1 IsActive: true @@ -9763,7 +9779,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9804,7 +9820,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9845,7 +9861,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9886,7 +9902,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9927,7 +9943,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -9955,7 +9971,6 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false - print: false - EID: 65703 Name: Piece1 IsActive: true @@ -9973,7 +9988,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10014,7 +10029,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10055,7 +10070,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10096,7 +10111,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10137,7 +10152,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10165,7 +10180,6 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false - print: false - EID: 65708 Name: Piece1 IsActive: true @@ -10183,7 +10197,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10224,7 +10238,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10265,7 +10279,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10306,7 +10320,7 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true Interpolate: true Sleeping Enabled: true @@ -10430,9 +10444,9 @@ RigidBody Component: Type: Dynamic Drag: 0.00999999978 - Angular Drag: 0.00999999978 + Angular Drag: 0.100000001 Use Gravity: true - Interpolate: false + Interpolate: true Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false From 382a2d0f6a6777d798b1956a0d1108d5d705e9b8 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Fri, 3 Feb 2023 22:44:02 +0800 Subject: [PATCH 09/12] Added start game button. Texture changing for buttons now only change when necessary --- Assets/Editor/Layouts/UserLayout.ini | 34 ++++++++--------- Assets/Scenes/MainMenu.shade | 27 +++++++++++++- Assets/Scripts/UI/SC_ChangeSceneButton.cs | 28 ++++++++++++++ .../Scripts/UI/SC_ChangeSceneButton.cs.shmeta | 3 ++ Assets/Shaders/UI_FS.glsl | 5 +++ Assets/Shaders/UI_FS.shshaderb | Bin 1941 -> 2101 bytes SHADE_Engine/src/UI/SHButtonComponent.cpp | 2 +- SHADE_Engine/src/UI/SHButtonComponent.h | 2 + .../src/UI/SHToggleButtonComponent.cpp | 2 +- SHADE_Engine/src/UI/SHToggleButtonComponent.h | 2 + SHADE_Engine/src/UI/SHUISystem.cpp | 35 ++++++++++++++---- 11 files changed, 112 insertions(+), 28 deletions(-) create mode 100644 Assets/Scripts/UI/SC_ChangeSceneButton.cs create mode 100644 Assets/Scripts/UI/SC_ChangeSceneButton.cs.shmeta diff --git a/Assets/Editor/Layouts/UserLayout.ini b/Assets/Editor/Layouts/UserLayout.ini index c9b890bd..9710aef1 100644 --- a/Assets/Editor/Layouts/UserLayout.ini +++ b/Assets/Editor/Layouts/UserLayout.ini @@ -1,16 +1,16 @@ [Window][MainStatusBar] -Pos=0,981 -Size=1920,20 +Pos=0,989 +Size=2560,20 Collapsed=0 [Window][SHEditorMenuBar] Pos=0,48 -Size=1920,933 +Size=2560,941 Collapsed=0 [Window][Hierarchy Panel] -Pos=0,186 -Size=300,795 +Pos=0,187 +Size=300,802 Collapsed=0 DockId=0x00000004,0 @@ -20,14 +20,14 @@ Size=400,400 Collapsed=0 [Window][Inspector] -Pos=1434,48 -Size=486,933 +Pos=2074,48 +Size=486,941 Collapsed=0 DockId=0x00000006,0 [Window][Profiler] Pos=0,48 -Size=300,136 +Size=300,137 Collapsed=0 DockId=0x00000003,0 @@ -76,7 +76,7 @@ DockId=0x0000000B,0 [Window][ Viewport] Pos=302,48 -Size=1130,697 +Size=1770,705 Collapsed=0 DockId=0x0000000B,0 @@ -93,14 +93,14 @@ Collapsed=0 DockId=0x0000000A,0 [Window][ Asset Browser] -Pos=302,747 -Size=1130,234 +Pos=302,755 +Size=1770,234 Collapsed=0 DockId=0x0000000C,0 [Window][Material Inspector] -Pos=1434,48 -Size=486,933 +Pos=2074,48 +Size=486,941 Collapsed=0 DockId=0x00000006,1 @@ -116,13 +116,13 @@ Collapsed=0 [Window][Collider Tag Panel] Pos=302,48 -Size=1130,697 +Size=1770,705 Collapsed=0 DockId=0x0000000B,1 [Window][Input Bindings Panel] -Pos=1434,48 -Size=486,933 +Pos=2074,48 +Size=486,941 Collapsed=0 DockId=0x00000006,2 @@ -151,7 +151,7 @@ Column 15 Weight=1.2009 Column 16 Weight=1.0132 [Docking][Data] -DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,77 Size=1920,933 Split=X +DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=2560,941 Split=X DockNode ID=0x00000005 Parent=0xC5C9B8AB SizeRef=1432,1036 Split=X DockNode ID=0x00000001 Parent=0x00000005 SizeRef=300,1036 Split=Y Selected=0x1E6EB881 DockNode ID=0x00000003 Parent=0x00000001 SizeRef=225,147 Selected=0x1E6EB881 diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 9e6be582..e33b8115 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -1,7 +1,7 @@ - EID: 0 Name: Canvas IsActive: true - NumberOfChildren: 1 + NumberOfChildren: 2 Components: Canvas Component: Canvas Width: 1920 @@ -9,7 +9,7 @@ IsActive: true Scripts: ~ - EID: 1 - Name: Default + Name: Background IsActive: true NumberOfChildren: 0 Components: @@ -23,6 +23,29 @@ Material: 121834459 IsActive: true Scripts: ~ +- EID: 5 + Name: Start Game Button + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 75, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 400, y: 200, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 52901020 + Hovered Texture: 62235279 + Clicked Texture: 64722619 + IsActive: true + Scripts: + - Type: ChangeSceneButton + Enabled: true + sceneID: 86098106 - EID: 2 Name: Light IsActive: true diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs b/Assets/Scripts/UI/SC_ChangeSceneButton.cs new file mode 100644 index 00000000..72e15f85 --- /dev/null +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs @@ -0,0 +1,28 @@ +using System; +using SHADE; + +public class ChangeSceneButton : Script +{ + public uint sceneID = 0; + + + protected override void awake() + { + UIElement ui = GetComponent(); + ui.OnClick.RegisterAction(() => + { + if(sceneID != 0) + { + Audio.PlaySFXOnce2D("event:/UI/success"); + SceneManager.ChangeScene(86098106); + Audio.StopAllSounds(); + } + }); + + + } + protected override void update() + { + + } +} diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs.shmeta b/Assets/Scripts/UI/SC_ChangeSceneButton.cs.shmeta new file mode 100644 index 00000000..ec10252b --- /dev/null +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_ChangeSceneButton +ID: 155329160 +Type: 9 diff --git a/Assets/Shaders/UI_FS.glsl b/Assets/Shaders/UI_FS.glsl index a28642f4..3d40bc14 100644 --- a/Assets/Shaders/UI_FS.glsl +++ b/Assets/Shaders/UI_FS.glsl @@ -39,5 +39,10 @@ layout(location = 1) out uint outEntityID; void main() { fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv); + if (fragColor.a < 0.01f) + { + discard; + } + outEntityID = In2.eid; } \ No newline at end of file diff --git a/Assets/Shaders/UI_FS.shshaderb b/Assets/Shaders/UI_FS.shshaderb index ce1dd7e9c0a416be4f198d797c9709fa254dd63e..024d0a3d8912a8a893cbc4520e1df418fe57781c 100644 GIT binary patch delta 306 zcmXX>OA5kJ49t72RSVKCq=KLbT`K;n(y!n_T)FoO9>A4|7w`rmf;aIXE)-F4ro0Ek zB$H&4ck*t2;16n2K1+vH5hboPq&Nh7m0Zpnt&*!_MGBPKo?iFGmKNHFfCcoBk4)@< zStm~c_Yvkz(GnqMUkv69=QEQhMq@oaZk^|jZeySha7$qvCq}}2dKSq0pl;e#+cd)9w|5j+CUfJ9$eOu+!U5D<$2717>(comp.GetEID()); //auto texture = SHResourceManager::Get(comp.GetDefaultTexture()); - auto material = renderable->GetModifiableMaterial(); + + AssetID textureID = 0; if (!comp.isHovered && !comp.isClicked) { if (comp.GetDefaultTexture() != 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetDefaultTexture())); + textureID = comp.GetDefaultTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetDefaultTexture())); //SHLOG_INFO("SETTING DEFAULT TEXTURE") } } @@ -249,7 +251,8 @@ namespace SHADE { if (comp.GetClickedTexture() != 0 && SHAssetManager::GetType(comp.GetClickedTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetClickedTexture())); + textureID = comp.GetClickedTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetClickedTexture())); //SHLOG_INFO("SETTING CLICKED TEXTURE") } } @@ -257,10 +260,17 @@ namespace SHADE { if (comp.GetHoveredTexture() != 0 && SHAssetManager::GetType(comp.GetHoveredTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet( comp.GetHoveredTexture())); + textureID = comp.GetHoveredTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet( comp.GetHoveredTexture())); //SHLOG_INFO("SETTING HOVERED TEXTURE") } } + if (textureID != 0 && textureID != comp.currentTexture) + { + auto material = renderable->GetModifiableMaterial(); + comp.currentTexture = textureID; + material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(textureID)); + } @@ -358,12 +368,14 @@ namespace SHADE auto renderable = SHComponentManager::GetComponent_s(comp.GetEID()); //auto texture = SHResourceManager::Get(comp.GetDefaultTexture()); - auto material = renderable->GetModifiableMaterial(); + //auto material = renderable->GetModifiableMaterial(); + AssetID textureID = 0; if (comp.GetValue() == false) { if (comp.GetDefaultTexture()!= 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetDefaultTexture())); + textureID = comp.GetDefaultTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetDefaultTexture())); //SHLOG_INFO("SETTING DEFAULT TEXTURE") } } @@ -371,11 +383,20 @@ namespace SHADE { if (comp.GetToggledTexture() != 0 && SHAssetManager::GetType(comp.GetToggledTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetToggledTexture())); + textureID = comp.GetToggledTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetToggledTexture())); //SHLOG_INFO("SETTING DEFAULT TEXTURE") } } + if (textureID != 0 && textureID != comp.currentTexture) + { + auto material = renderable->GetModifiableMaterial(); + comp.currentTexture = textureID; + material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(textureID)); + } + + } } From ebf1ab39cf1a0e127d184d8efc90993a35875519 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Fri, 3 Feb 2023 22:59:49 +0800 Subject: [PATCH 10/12] Added some buttons to lose screen --- Assets/Editor/Editor.SHConfig | 2 +- Assets/Editor/Layouts/UserLayout.ini | 24 ++++++++++---------- Assets/Scenes/LoseScene.shade | 27 +++++++++++++++++++++-- Assets/Scenes/MainMenu.shade | 24 +++++++++++++++++++- Assets/Scripts/UI/SC_ChangeSceneButton.cs | 2 +- Assets/Scripts/UI/SC_QuitButton.cs | 21 ++++++++++++++++++ Assets/Scripts/UI/SC_QuitButton.cs.shmeta | 3 +++ 7 files changed, 86 insertions(+), 17 deletions(-) create mode 100644 Assets/Scripts/UI/SC_QuitButton.cs create mode 100644 Assets/Scripts/UI/SC_QuitButton.cs.shmeta diff --git a/Assets/Editor/Editor.SHConfig b/Assets/Editor/Editor.SHConfig index 37edf50c..fb0d85dd 100644 --- a/Assets/Editor/Editor.SHConfig +++ b/Assets/Editor/Editor.SHConfig @@ -1,4 +1,4 @@ Start Maximized: true -Working Scene ID: 97158628 +Working Scene ID: 91685359 Window Size: {x: 1920, y: 1013} Style: 0 \ No newline at end of file diff --git a/Assets/Editor/Layouts/UserLayout.ini b/Assets/Editor/Layouts/UserLayout.ini index 9710aef1..ae777185 100644 --- a/Assets/Editor/Layouts/UserLayout.ini +++ b/Assets/Editor/Layouts/UserLayout.ini @@ -20,8 +20,8 @@ Size=400,400 Collapsed=0 [Window][Inspector] -Pos=2074,48 -Size=486,941 +Pos=2027,48 +Size=533,941 Collapsed=0 DockId=0x00000006,0 @@ -76,7 +76,7 @@ DockId=0x0000000B,0 [Window][ Viewport] Pos=302,48 -Size=1770,705 +Size=1723,705 Collapsed=0 DockId=0x0000000B,0 @@ -94,13 +94,13 @@ DockId=0x0000000A,0 [Window][ Asset Browser] Pos=302,755 -Size=1770,234 +Size=1723,234 Collapsed=0 DockId=0x0000000C,0 [Window][Material Inspector] -Pos=2074,48 -Size=486,941 +Pos=2027,48 +Size=533,941 Collapsed=0 DockId=0x00000006,1 @@ -116,13 +116,13 @@ Collapsed=0 [Window][Collider Tag Panel] Pos=302,48 -Size=1770,705 +Size=1723,705 Collapsed=0 DockId=0x0000000B,1 [Window][Input Bindings Panel] -Pos=2074,48 -Size=486,941 +Pos=2027,48 +Size=533,941 Collapsed=0 DockId=0x00000006,2 @@ -152,16 +152,16 @@ Column 16 Weight=1.0132 [Docking][Data] DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=2560,941 Split=X - DockNode ID=0x00000005 Parent=0xC5C9B8AB SizeRef=1432,1036 Split=X + DockNode ID=0x00000005 Parent=0xC5C9B8AB SizeRef=2025,1036 Split=X DockNode ID=0x00000001 Parent=0x00000005 SizeRef=300,1036 Split=Y Selected=0x1E6EB881 DockNode ID=0x00000003 Parent=0x00000001 SizeRef=225,147 Selected=0x1E6EB881 DockNode ID=0x00000004 Parent=0x00000001 SizeRef=225,863 Selected=0xE096E5AE - DockNode ID=0x00000002 Parent=0x00000005 SizeRef=1130,1036 Split=Y Selected=0xB41284E7 + DockNode ID=0x00000002 Parent=0x00000005 SizeRef=1723,1036 Split=Y Selected=0xB41284E7 DockNode ID=0x00000007 Parent=0x00000002 SizeRef=1501,672 Split=Y Selected=0xB41284E7 DockNode ID=0x00000009 Parent=0x00000007 SizeRef=1501,700 Split=Y Selected=0xB41284E7 DockNode ID=0x0000000B Parent=0x00000009 SizeRef=1501,705 CentralNode=1 Selected=0xB41284E7 DockNode ID=0x0000000C Parent=0x00000009 SizeRef=1501,234 Selected=0xB128252A DockNode ID=0x0000000A Parent=0x00000007 SizeRef=1501,310 Selected=0xD446F7B6 DockNode ID=0x00000008 Parent=0x00000002 SizeRef=1501,338 Selected=0xD9F31532 - DockNode ID=0x00000006 Parent=0xC5C9B8AB SizeRef=486,1036 Selected=0xE7039252 + DockNode ID=0x00000006 Parent=0xC5C9B8AB SizeRef=533,1036 Selected=0xE7039252 diff --git a/Assets/Scenes/LoseScene.shade b/Assets/Scenes/LoseScene.shade index f4e7dd1d..7969c063 100644 --- a/Assets/Scenes/LoseScene.shade +++ b/Assets/Scenes/LoseScene.shade @@ -15,7 +15,7 @@ - EID: 1 Name: Canvas IsActive: true - NumberOfChildren: 1 + NumberOfChildren: 2 Components: Canvas Component: Canvas Width: 1920 @@ -23,7 +23,7 @@ IsActive: true Scripts: ~ - EID: 2 - Name: Default + Name: Back Ground IsActive: true NumberOfChildren: 0 Components: @@ -37,6 +37,29 @@ Material: 123313564 IsActive: true Scripts: ~ +- EID: 5 + Name: Main Menu Button + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 400, y: 200, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 65788519 + Hovered Texture: 55999018 + Clicked Texture: 66382894 + IsActive: true + Scripts: + - Type: ChangeSceneButton + Enabled: true + sceneID: 97158628 - EID: 3 Name: Camera IsActive: true diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index e33b8115..680bf8a2 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -1,7 +1,7 @@ - EID: 0 Name: Canvas IsActive: true - NumberOfChildren: 2 + NumberOfChildren: 3 Components: Canvas Component: Canvas Width: 1920 @@ -46,6 +46,28 @@ - Type: ChangeSceneButton Enabled: true sceneID: 86098106 +- EID: 6 + Name: Quit Game Button + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -200, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 400, y: 200, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 66477839 + Hovered Texture: 65045286 + Clicked Texture: 58607560 + IsActive: true + Scripts: + - Type: QuitButton + Enabled: true - EID: 2 Name: Light IsActive: true diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs b/Assets/Scripts/UI/SC_ChangeSceneButton.cs index 72e15f85..dea6b5b7 100644 --- a/Assets/Scripts/UI/SC_ChangeSceneButton.cs +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs @@ -14,7 +14,7 @@ public class ChangeSceneButton : Script if(sceneID != 0) { Audio.PlaySFXOnce2D("event:/UI/success"); - SceneManager.ChangeScene(86098106); + SceneManager.ChangeScene(sceneID); Audio.StopAllSounds(); } }); diff --git a/Assets/Scripts/UI/SC_QuitButton.cs b/Assets/Scripts/UI/SC_QuitButton.cs new file mode 100644 index 00000000..d315c787 --- /dev/null +++ b/Assets/Scripts/UI/SC_QuitButton.cs @@ -0,0 +1,21 @@ +using System; +using SHADE; + +public class QuitButton : Script +{ + protected override void awake() + { + UIElement ui = GetComponent(); + ui.OnClick.RegisterAction(() => + { + Audio.StopAllSounds(); + Application.Quit(); + }); + + + } + protected override void update() + { + + } +} diff --git a/Assets/Scripts/UI/SC_QuitButton.cs.shmeta b/Assets/Scripts/UI/SC_QuitButton.cs.shmeta new file mode 100644 index 00000000..9815e97f --- /dev/null +++ b/Assets/Scripts/UI/SC_QuitButton.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_QuitButton +ID: 163136401 +Type: 9 From 7a79cda7298a8965892e5f87de58804993ccb4c6 Mon Sep 17 00:00:00 2001 From: Diren D Bharwani Date: Fri, 3 Feb 2023 23:22:21 +0800 Subject: [PATCH 11/12] Reworked Collision Tag Interface and Logic --- Assets/CollisionTags.SHConfig | 18 ++++++- Assets/Editor/Layouts/UserLayout.ini | 10 ++-- .../ColliderTagPanel/SHColliderTagPanel.cpp | 54 ++++++++++--------- .../CollisionTags/SHCollisionTagMatrix.cpp | 23 ++++++-- .../CollisionTags/SHCollisionTagMatrix.h | 4 +- .../Collision/Shapes/SHCollisionShape.cpp | 9 +++- .../src/Physics/System/SHPhysicsSystem.cpp | 4 +- 7 files changed, 79 insertions(+), 43 deletions(-) diff --git a/Assets/CollisionTags.SHConfig b/Assets/CollisionTags.SHConfig index 44cfb2dc..7645bbd0 100644 --- a/Assets/CollisionTags.SHConfig +++ b/Assets/CollisionTags.SHConfig @@ -1,2 +1,16 @@ -0 1 65535 -1 2 65415 +0 1 0000000000000000 +1 2 0000000000000000 +2 3 0000000000000000 +3 4 0000000000000000 +4 5 0000000000000000 +5 6 0000000000000000 +6 7 0000000000000000 +7 8 0000000000000000 +8 9 0000000000000000 +9 10 0000000000000000 +10 11 0000000000000000 +11 12 0000000000000000 +12 13 0000000000000000 +13 14 0000000000000000 +14 15 0000000000000000 +15 16 0000000000000000 diff --git a/Assets/Editor/Layouts/UserLayout.ini b/Assets/Editor/Layouts/UserLayout.ini index 2c3c4806..d59a3d01 100644 --- a/Assets/Editor/Layouts/UserLayout.ini +++ b/Assets/Editor/Layouts/UserLayout.ini @@ -132,8 +132,8 @@ Size=165,120 Collapsed=0 [Table][0x9D40AE32,17] -Column 0 Weight=0.9945 -Column 1 Weight=0.9945 +Column 0 Weight=1.0696 +Column 1 Weight=0.9194 Column 2 Weight=0.9945 Column 3 Weight=1.0320 Column 4 Weight=0.9570 @@ -147,8 +147,8 @@ Column 11 Weight=1.0133 Column 12 Weight=0.9945 Column 13 Weight=0.8444 Column 14 Weight=0.9945 -Column 15 Weight=1.2009 -Column 16 Weight=1.0133 +Column 15 Weight=0.8632 +Column 16 Weight=1.3510 [Docking][Data] DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=1920,941 Split=X @@ -159,7 +159,7 @@ DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=1920,941 Split DockNode ID=0x00000002 Parent=0x00000005 SizeRef=1130,1036 Split=Y Selected=0xB41284E7 DockNode ID=0x00000007 Parent=0x00000002 SizeRef=1501,672 Split=Y Selected=0xB41284E7 DockNode ID=0x00000009 Parent=0x00000007 SizeRef=1501,700 Split=Y Selected=0xB41284E7 - DockNode ID=0x0000000B Parent=0x00000009 SizeRef=1501,705 CentralNode=1 Selected=0xB41284E7 + DockNode ID=0x0000000B Parent=0x00000009 SizeRef=1501,705 CentralNode=1 Selected=0x69428B24 DockNode ID=0x0000000C Parent=0x00000009 SizeRef=1501,234 Selected=0xB128252A DockNode ID=0x0000000A Parent=0x00000007 SizeRef=1501,310 Selected=0xD446F7B6 DockNode ID=0x00000008 Parent=0x00000002 SizeRef=1501,338 Selected=0xD9F31532 diff --git a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp index e40bb643..97d9a34b 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp @@ -16,48 +16,52 @@ namespace SHADE ImGui::TableNextRow(); ImGui::PushID("CollisionTagNames"); - for (int i = SHCollisionTag::NUM_LAYERS; i >= 1; --i) + // Draw Layers + // We have 16 layers for each tag + ImGui::TableNextColumn(); + + for (int i = 1; i <= SHCollisionTag::NUM_LAYERS; ++i) { ImGui::TableNextColumn(); - if(i == SHCollisionTag::NUM_LAYERS) continue; + std::string const& tagName = SHCollisionTagMatrix::GetTagName(i); auto tag = SHCollisionTagMatrix::GetTag(i); if (!tag) continue; - //ImGui::Text(tagName.data()); - ImGui::PushID(i); - SHEditorWidgets::InputText("##", [i]{return SHCollisionTagMatrix::GetTagName(i);}, [i](std::string const& value){SHCollisionTagMatrix::GetTag(i)->SetName(value);}, tagName.data(), ImGuiInputTextFlags_EnterReturnsTrue); - ImGui::PopID(); + + // Show the layer number + ImGui::Text(std::to_string(i).c_str()); + } ImGui::PopID(); + + // Draw the table + // Convenient how we have 16 layers & 16 tags huh? + for (int i = 0; i < SHCollisionTag::NUM_LAYERS - 1; ++i) { std::string tagName = SHCollisionTagMatrix::GetTagName(i); auto tag = SHCollisionTagMatrix::GetTag(i); + if(!tag) continue; + ImGui::TableNextRow(); ImGui::TableNextColumn(); - ImGui::Text(tagName.data()); - for (int j = (SHCollisionTag::NUM_LAYERS) - 1; j >= i; --j) + + ImGui::PushID(i); + SHEditorWidgets::InputText("##", [i]{return SHCollisionTagMatrix::GetTagName(i);}, [i](std::string const& value){SHCollisionTagMatrix::GetTag(i)->SetName(value);}, tagName.data(), ImGuiInputTextFlags_EnterReturnsTrue); + ImGui::PopID(); + + // The checkboxes are just to set the layers of each tag + // Nothing else should be altered. + + for (int j = 0; j < SHCollisionTag::NUM_LAYERS; ++j) { - int idx = j; - std::string tagName2 = SHCollisionTagMatrix::GetTagName(idx); - auto tag2 = SHCollisionTagMatrix::GetTag(idx); - - if(!tag2) - continue; - - if(tagName.empty()) - tagName = std::to_string(i); - if(tagName2.empty()) - tagName2 = std::to_string(idx); - ImGui::TableNextColumn(); - if(i == idx) - continue; - std::string label = std::format("##{} vs {}", tagName, tagName2); - if (SHEditorWidgets::CheckBox(label, [tag, &idx] {return tag->GetLayerState(idx); }, [tag, i, idx](bool const& value) {tag->SetLayerState(idx, value); SHCollisionTagMatrix::GetTag(idx)->SetLayerState(i, value); }, label.substr(2))) + + std::string label = std::format("##{}, Layer {}", tagName, j); + if (SHEditorWidgets::CheckBox(label, [tag, &j] {return tag->GetLayerState(j); }, [tag, j](bool const& value) {tag->SetLayerState(j, value); }, label.substr(2))) { isDirty = true; } @@ -77,7 +81,7 @@ namespace SHADE { std::filesystem::path defaultCollisionTagNameFilePath{ ASSET_ROOT }; defaultCollisionTagNameFilePath.append("CollisionTags.SHConfig"); - SHCollisionTagMatrix::Exit(defaultCollisionTagNameFilePath); + SHCollisionTagMatrix::SaveToFile(defaultCollisionTagNameFilePath); isDirty = false; } ImGui::EndDisabled(); diff --git a/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.cpp b/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.cpp index 9b2effbd..ac34a449 100644 --- a/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.cpp +++ b/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.cpp @@ -166,7 +166,7 @@ namespace SHADE /* Public Function Member Definitions */ /*-----------------------------------------------------------------------------------*/ - void SHCollisionTagMatrix::Init(const std::filesystem::path& tagNameFilePath) noexcept + void SHCollisionTagMatrix::LoadFromFile(const std::filesystem::path& tagNameFilePath) noexcept { /** * I HATE FILE IO @@ -240,21 +240,26 @@ namespace SHADE , linesRead + 1 , tagIndex ) + + collisionTags[tagIndex].SetMask(mask); } else { mask = static_cast(std::stoi(maskString)); + for (int i = 0; i < SHCollisionTag::NUM_LAYERS; ++i) + { + const bool LAYER_STATE = mask & 1U << i; + collisionTags[tagIndex].SetLayerState(i, LAYER_STATE); + } } - collisionTags[tagIndex].SetMask(mask); - ss.clear(); } collisionTagNamesFile.close(); } - void SHCollisionTagMatrix::Exit(const std::filesystem::path& tagNameFilePath) noexcept + void SHCollisionTagMatrix::SaveToFile(const std::filesystem::path& tagNameFilePath) noexcept { std::ofstream collisionTagNamesFile { tagNameFilePath }; @@ -266,7 +271,15 @@ namespace SHADE // Index Name Mask for (int i = 0; i < SHCollisionTag::NUM_LAYERS; ++i) - collisionTagNamesFile << i << " " << collisionTags[i].GetName() << " " << collisionTags[i].GetMask() << std::endl; + { + collisionTagNamesFile << i << " " << collisionTags[i].GetName() << " "; + + // Write 1 or 0 for each layer for improved clarity + for (int j = 0; j < SHCollisionTag::NUM_LAYERS; ++j) + collisionTagNamesFile << (collisionTags[i].GetMask() & 1U << j ? 1 : 0); + + collisionTagNamesFile << std::endl; + } collisionTagNamesFile.close(); } diff --git a/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.h b/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.h index 6ece83ac..726ba8f6 100644 --- a/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.h +++ b/SHADE_Engine/src/Physics/Collision/CollisionTags/SHCollisionTagMatrix.h @@ -55,8 +55,8 @@ namespace SHADE /* Function Members */ /*---------------------------------------------------------------------------------*/ - static void Init (const std::filesystem::path& tagNameFilePath) noexcept; - static void Exit (const std::filesystem::path& tagNameFilePath) noexcept; + static void LoadFromFile (const std::filesystem::path& tagNameFilePath) noexcept; + static void SaveToFile (const std::filesystem::path& tagNameFilePath) noexcept; /** * @brief diff --git a/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp b/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp index 219c3e47..bd67d42f 100644 --- a/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp +++ b/SHADE_Engine/src/Physics/Collision/Shapes/SHCollisionShape.cpp @@ -120,7 +120,10 @@ namespace SHADE collisionTag = newCollisionTag; if (rp3dCollider) + { + rp3dCollider->setCollisionCategoryBits(collisionTag->GetMask()); rp3dCollider->setCollideWithMaskBits(collisionTag->GetMask()); + } } void SHCollisionShape::SetFriction(float friction) noexcept @@ -150,7 +153,6 @@ namespace SHADE // Recompute the bodies' mass dynamic_cast(collider->collisionBody)->updateMassPropertiesFromColliders(); } - } void SHCollisionShape::SetMaterial(const SHPhysicsMaterial& newMaterial) noexcept @@ -204,8 +206,11 @@ namespace SHADE void SHCollisionShape::UpdateCollisionTags() noexcept { - if (collisionTag->IsDirty()) + if (rp3dCollider && collisionTag->IsDirty()) + { + rp3dCollider->setCollisionCategoryBits(collisionTag->GetMask()); rp3dCollider->setCollideWithMaskBits(collisionTag->GetMask()); + } } diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp index ede0ede2..f4529a40 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp @@ -122,7 +122,7 @@ namespace SHADE // Initialise collision tags std::filesystem::path defaultCollisionTagNameFilePath { ASSET_ROOT }; defaultCollisionTagNameFilePath.append("CollisionTags.SHConfig"); - SHCollisionTagMatrix::Init(defaultCollisionTagNameFilePath); + SHCollisionTagMatrix::LoadFromFile(defaultCollisionTagNameFilePath); // Register Events for (int i = 0; i < NUM_EVENT_FUNCTIONS; ++i) @@ -145,7 +145,7 @@ namespace SHADE // Write collision tag names to file std::filesystem::path defaultCollisionTagNameFilePath { ASSET_ROOT }; defaultCollisionTagNameFilePath.append("CollisionTags.SHConfig"); - SHCollisionTagMatrix::Exit(defaultCollisionTagNameFilePath); + SHCollisionTagMatrix::SaveToFile(defaultCollisionTagNameFilePath); } const std::vector& SHPhysicsSystem::Raycast(const SHRaycaster::RaycastInfo& info) noexcept From fdacaf5036ad30c8cd51e6f9d5f8da25a5c93f59 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Fri, 3 Feb 2023 23:28:08 +0800 Subject: [PATCH 12/12] Added reminaing buttons for win and lose screens --- Assets/Scenes/LoseScene.shade | 26 +++++++++++- Assets/Scenes/MainMenu.shade | 2 +- Assets/Scenes/WinScene.shade | 49 ++++++++++++++++++++++- Assets/Scripts/UI/SC_ChangeSceneButton.cs | 2 +- Assets/Scripts/UI/SC_QuitButton.cs | 2 +- 5 files changed, 74 insertions(+), 7 deletions(-) diff --git a/Assets/Scenes/LoseScene.shade b/Assets/Scenes/LoseScene.shade index 7969c063..ad268932 100644 --- a/Assets/Scenes/LoseScene.shade +++ b/Assets/Scenes/LoseScene.shade @@ -15,7 +15,7 @@ - EID: 1 Name: Canvas IsActive: true - NumberOfChildren: 2 + NumberOfChildren: 3 Components: Canvas Component: Canvas Width: 1920 @@ -43,7 +43,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: 0} + Translate: {x: 0, y: 75, z: 0} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 400, y: 200, z: 1} IsActive: true @@ -60,6 +60,28 @@ - Type: ChangeSceneButton Enabled: true sceneID: 97158628 +- EID: 6 + Name: Quit Button + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -200, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 400, y: 200, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 66477839 + Hovered Texture: 65045286 + Clicked Texture: 58607560 + IsActive: true + Scripts: + - Type: QuitButton + Enabled: true - EID: 3 Name: Camera IsActive: true diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index c58546a8..25bf6994 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -45,7 +45,7 @@ Scripts: - Type: ChangeSceneButton Enabled: true - sceneID: 86098106 + sceneID: 96668835 - EID: 6 Name: Quit Game Button IsActive: true diff --git a/Assets/Scenes/WinScene.shade b/Assets/Scenes/WinScene.shade index 724d9b69..b70cba65 100644 --- a/Assets/Scenes/WinScene.shade +++ b/Assets/Scenes/WinScene.shade @@ -15,7 +15,7 @@ - EID: 1 Name: Canvas IsActive: true - NumberOfChildren: 1 + NumberOfChildren: 3 Components: Canvas Component: Canvas Width: 1920 @@ -23,7 +23,7 @@ IsActive: true Scripts: ~ - EID: 2 - Name: Default + Name: Background IsActive: true NumberOfChildren: 0 Components: @@ -37,6 +37,51 @@ Material: 129138332 IsActive: true Scripts: ~ +- EID: 5 + Name: Main Menu Button + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 75, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 400, y: 200, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 65788519 + Hovered Texture: 55999018 + Clicked Texture: 66382894 + IsActive: true + Scripts: + - Type: ChangeSceneButton + Enabled: true + sceneID: 97158628 +- EID: 6 + Name: Quit Button + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -200, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 400, y: 200, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 66477839 + Hovered Texture: 65045286 + Clicked Texture: 58607560 + IsActive: true + Scripts: + - Type: QuitButton + Enabled: true - EID: 3 Name: Camera IsActive: true diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs b/Assets/Scripts/UI/SC_ChangeSceneButton.cs index dea6b5b7..80bd1550 100644 --- a/Assets/Scripts/UI/SC_ChangeSceneButton.cs +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs @@ -6,7 +6,7 @@ public class ChangeSceneButton : Script public uint sceneID = 0; - protected override void awake() + protected override void start() { UIElement ui = GetComponent(); ui.OnClick.RegisterAction(() => diff --git a/Assets/Scripts/UI/SC_QuitButton.cs b/Assets/Scripts/UI/SC_QuitButton.cs index d315c787..17f6190c 100644 --- a/Assets/Scripts/UI/SC_QuitButton.cs +++ b/Assets/Scripts/UI/SC_QuitButton.cs @@ -3,7 +3,7 @@ using SHADE; public class QuitButton : Script { - protected override void awake() + protected override void start() { UIElement ui = GetComponent(); ui.OnClick.RegisterAction(() =>