diff --git a/.gitignore b/.gitignore index 1771ebb0..51709e10 100644 --- a/.gitignore +++ b/.gitignore @@ -366,3 +366,4 @@ MigrationBackup/ JSON/Schemas/Catalog/ Assets/Editor/Editor.SHConfig +Assets/Editor/Layouts/UserLayout.ini diff --git a/Assets/CollisionTags.SHConfig b/Assets/CollisionTags.SHConfig index 7645bbd0..78383bd8 100644 --- a/Assets/CollisionTags.SHConfig +++ b/Assets/CollisionTags.SHConfig @@ -1,10 +1,10 @@ -0 1 0000000000000000 -1 2 0000000000000000 -2 3 0000000000000000 -3 4 0000000000000000 -4 5 0000000000000000 -5 6 0000000000000000 -6 7 0000000000000000 +0 1 1111111000000000 +1 2 1111111000000000 +2 3 1111010000000000 +3 4 1111110000000000 +4 5 1101110000000000 +5 6 1111111000000000 +6 7 1100011000000000 7 8 0000000000000000 8 9 0000000000000000 9 10 0000000000000000 diff --git a/Assets/Editor/Editor.SHConfig b/Assets/Editor/Editor.SHConfig index 7a7c92f8..fb0d85dd 100644 --- a/Assets/Editor/Editor.SHConfig +++ b/Assets/Editor/Editor.SHConfig @@ -1,4 +1,4 @@ Start Maximized: true -Working Scene ID: 97086054 +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 deleted file mode 100644 index d59a3d01..00000000 --- a/Assets/Editor/Layouts/UserLayout.ini +++ /dev/null @@ -1,167 +0,0 @@ -[Window][MainStatusBar] -Pos=0,989 -Size=1920,20 -Collapsed=0 - -[Window][SHEditorMenuBar] -Pos=0,48 -Size=1920,941 -Collapsed=0 - -[Window][Hierarchy Panel] -Pos=0,187 -Size=300,802 -Collapsed=0 -DockId=0x00000004,0 - -[Window][Debug##Default] -Pos=60,60 -Size=400,400 -Collapsed=0 - -[Window][Inspector] -Pos=1434,48 -Size=486,941 -Collapsed=0 -DockId=0x00000006,0 - -[Window][Profiler] -Pos=0,48 -Size=300,137 -Collapsed=0 -DockId=0x00000003,0 - -[Window][Viewport] -Pos=227,48 -Size=1457,1012 -Collapsed=0 -DockId=0x0000000B,0 - -[Window][面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面o] -Pos=60,60 -Size=32,64 -Collapsed=0 - -[Window][面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面] -Pos=60,60 -Size=999,581 -Collapsed=0 - -[Window][o] -Pos=60,60 -Size=32,64 -Collapsed=0 - -[Window][面面] -Pos=60,60 -Size=553,422 -Collapsed=0 - -[Window][] -Pos=60,60 -Size=770,394 -Collapsed=0 - -[Window][ Viewport] -Pos=227,48 -Size=1457,1012 -Collapsed=0 -DockId=0x0000000B,0 - -[Window][ Viewport] -Pos=227,48 -Size=1457,1012 -Collapsed=0 -DockId=0x0000000B,0 - -[Window][ Viewport] -Pos=302,48 -Size=1130,705 -Collapsed=0 -DockId=0x0000000B,0 - -[Window][V] -Pos=310,722 -Size=1501,338 -Collapsed=0 -DockId=0x00000008,0 - -[Window][p] -Pos=310,750 -Size=1501,310 -Collapsed=0 -DockId=0x0000000A,0 - -[Window][ Asset Browser] -Pos=302,755 -Size=1130,234 -Collapsed=0 -DockId=0x0000000C,0 - -[Window][Material Inspector] -Pos=1434,48 -Size=486,941 -Collapsed=0 -DockId=0x00000006,1 - -[Window][Save scene as...] -Pos=1197,693 -Size=165,120 -Collapsed=0 - -[Window][Create New Asset] -Pos=896,472 -Size=464,144 -Collapsed=0 - -[Window][Collider Tag Panel] -Pos=302,48 -Size=1130,705 -Collapsed=0 -DockId=0x0000000B,1 - -[Window][Input Bindings Panel] -Pos=1434,48 -Size=486,941 -Collapsed=0 -DockId=0x00000006,2 - -[Window][Save Scene As] -Pos=877,444 -Size=165,120 -Collapsed=0 - -[Table][0x9D40AE32,17] -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 -Column 5 Weight=0.9945 -Column 6 Weight=0.9945 -Column 7 Weight=0.9945 -Column 8 Weight=0.9945 -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=0.8632 -Column 16 Weight=1.3510 - -[Docking][Data] -DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=1920,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 - DockNode ID=0x00000004 Parent=0x00000001 SizeRef=225,863 Selected=0xE096E5AE - 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=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 - DockNode ID=0x00000006 Parent=0xC5C9B8AB SizeRef=486,1036 Selected=0xE7039252 - diff --git a/Assets/Materials/UIMat.shmat b/Assets/Materials/UIMat.shmat index 625021b0..36c2f66c 100644 --- a/Assets/Materials/UIMat.shmat +++ b/Assets/Materials/UIMat.shmat @@ -1,8 +1,8 @@ - VertexShader: 46580970 FragmentShader: 35983630 - SubPass: G-Buffer Write + SubPass: UI Properties: data.color: {x: 1, y: 1, z: 1, w: 1} - data.textureIndex: 54429632 + data.textureIndex: 51995224 data.alpha: 0 data.beta: {x: 1, y: 1, z: 1} \ No newline at end of file diff --git a/Assets/Scenes/Level1Scene.shade b/Assets/Scenes/Level1Scene.shade index 04f03bba..d93c49b5 100644 --- a/Assets/Scenes/Level1Scene.shade +++ b/Assets/Scenes/Level1Scene.shade @@ -2583,7 +2583,7 @@ Components: Transform Component: Translate: {x: 0, y: 0, z: 0} - Rotate: {x: -1.48352981, y: 0, z: 0} + Rotate: {x: 1.48352981, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -2727,13 +2727,13 @@ IsActive: true Scripts: ~ - EID: 141 - Name: SkyDome + Name: FloorMaster IsActive: true NumberOfChildren: 0 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: @@ -4256,120 +4256,6 @@ Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true 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: 0.00999999978 - 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: ~ -- 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: ~ -- 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 @@ -4426,7 +4312,21 @@ IsActive: true NumberOfChildren: 0 Components: ~ - Scripts: ~ + Scripts: + - Type: GameManager + Enabled: true + winScene: 92009475 + loseScene: 91685359 + currGameState: 0 + totalItemCount: 0 + Score: 0 + timer: 200 + scoreText: 237 + timeText: 206 + multiplierText: 238 + maxMultiplierDuration: 5 + maxMultiplierCombo: 10 + multiplierFont: 60 - EID: 235 Name: ====AI===== IsActive: true @@ -4467,7 +4367,18 @@ Position Offset: {x: 0, y: 0.899999976, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: Homeowner1 + Enabled: true + waypointsPool: 234 + patrolSpeed: 0 + chaseSpeed: 0 + turningSpeed: 0 + sightDistance: 0 + eyeOffset: [0, 0, 0] + distanceToCapture: 0 + captureTime: 0 + footstepSFXIntervalMultiplier: 0 - EID: 234 Name: ====WaypointPool==== IsActive: true @@ -4521,7 +4432,7 @@ - EID: 240 Name: ====ItemPool==== IsActive: true - NumberOfChildren: 3 + NumberOfChildren: 4 Components: ~ Scripts: ~ - EID: 241 @@ -4543,7 +4454,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -4555,7 +4466,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012} Friction: 0.400000006 @@ -4564,7 +4475,13 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 1 + dontReturn: false - EID: 227 Name: Mesh_Cheese IsActive: true @@ -4596,7 +4513,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} Friction: 0.400000006 @@ -4605,7 +4522,13 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: Item + Enabled: true + Score: 500 + currCategory: 2 + density: 1 + dontReturn: false - EID: 65778 Name: Mesh_Apple IsActive: true @@ -4637,7 +4560,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 @@ -4646,7 +4569,60 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 1 + dontReturn: false +- EID: 216 + Name: Mesh_Apple + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -2.5, y: 0.778462529, z: -4.28408813} + 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.100000001 + 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: 3 + 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 @@ -4689,7 +4665,9 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: ScoringZone + Enabled: true - EID: 225 Name: ScoreZone IsActive: true @@ -4726,7 +4704,9 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: ScoringZone + Enabled: true - EID: 224 Name: ScoreZone IsActive: true @@ -4763,7 +4743,9 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: ScoringZone + Enabled: true - EID: 223 Name: ScoreZone IsActive: true @@ -4800,7 +4782,9 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: ScoringZone + Enabled: true - EID: 222 Name: ScoreZone IsActive: true @@ -4837,7 +4821,9 @@ Position Offset: {x: 0, y: 0, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: ScoringZone + Enabled: true - EID: 217 Name: ===Anims=== IsActive: true @@ -4919,4 +4905,148 @@ Rig: 76715962 Clip: 76715962 IsActive: true + Scripts: ~ +- EID: 198 + Name: ====Raccoon==== + IsActive: true + NumberOfChildren: 2 + Components: ~ + Scripts: ~ +- EID: 65775 + Name: Player + IsActive: true + NumberOfChildren: 3 + Components: + Transform Component: + Translate: {x: -8, y: 1.142977, 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: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: false + Interpolate: false + 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: 2 + 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: 65732 + 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: 65733 + 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: 65730 + 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: 65731 + 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: 65732 + 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: ~ \ No newline at end of file diff --git a/Assets/Scenes/LoseScene.shade b/Assets/Scenes/LoseScene.shade index f4e7dd1d..501c203f 100644 --- a/Assets/Scenes/LoseScene.shade +++ b/Assets/Scenes/LoseScene.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: Back Ground IsActive: true NumberOfChildren: 0 Components: @@ -36,7 +36,61 @@ Mesh: 141771688 Material: 123313564 IsActive: true + UI Component: + Canvas ID: 1 + 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 + UI Component: + Canvas ID: 1 + 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 + UI Component: + Canvas ID: 1 + IsActive: true + Scripts: + - Type: QuitButton + Enabled: true - EID: 3 Name: Camera IsActive: true diff --git a/Assets/Scenes/MainGame.shade b/Assets/Scenes/MainGame.shade index 6d4d696a..091037a9 100644 --- a/Assets/Scenes/MainGame.shade +++ b/Assets/Scenes/MainGame.shade @@ -8507,7 +8507,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8519,7 +8519,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012} Friction: 0.400000006 @@ -8554,7 +8554,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8566,7 +8566,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012} Friction: 0.400000006 @@ -8601,7 +8601,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8613,7 +8613,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012} Friction: 0.400000006 @@ -8648,7 +8648,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8660,7 +8660,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} Friction: 0.400000006 @@ -8695,7 +8695,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8707,7 +8707,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} Friction: 0.400000006 @@ -8742,7 +8742,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8754,7 +8754,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} Friction: 0.400000006 @@ -8789,7 +8789,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8801,7 +8801,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 @@ -8836,7 +8836,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8848,7 +8848,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 @@ -8883,7 +8883,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8895,7 +8895,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 @@ -8917,8 +8917,8 @@ NumberOfChildren: 5 Components: Transform Component: - Translate: {x: 2.44600534, y: 0.333341181, z: 6.14019775} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: 1.65356398, y: 0.333341181, z: 7.14459705} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999979734, y: 1, z: 0.999979734} IsActive: true Renderable Component: @@ -8930,7 +8930,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8942,7 +8942,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Sphere Radius: 0.5 Friction: 0.400000006 @@ -8954,11 +8954,12 @@ Scripts: - Type: Breakable Enabled: true - threshHold: 2 + threshHold: 5 ignoreRaccoon: true + print: false - Type: Item Enabled: true - Score: 100 + Score: 500 currCategory: 2 density: 1 dontReturn: false @@ -8981,7 +8982,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -8993,7 +8994,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.25, y: 0.25, z: 0.100000001} Friction: 0.400000006 @@ -9028,7 +9029,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9040,7 +9041,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.300000012, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 @@ -9075,7 +9076,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9087,7 +9088,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.200000003, y: 0.0799999982, z: 0.200000003} Friction: 0.400000006 @@ -9122,7 +9123,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9134,7 +9135,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.200000003, y: 0.0500000007, z: 0.200000003} Friction: 0.400000006 @@ -9169,7 +9170,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9181,7 +9182,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Box Half Extents: {x: 0.25, y: 0.0500000007, z: 0.200000003} Friction: 0.400000006 @@ -9216,7 +9217,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9228,9 +9229,9 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 3 Type: Sphere - Radius: 0.075000003 + Radius: 0.200000003 Friction: 0.400000006 Bounciness: 0 Density: 1 @@ -9240,13 +9241,14 @@ Scripts: - Type: Breakable Enabled: true - threshHold: 1 + threshHold: 1.5 ignoreRaccoon: true + print: false - Type: Item Enabled: true Score: 10 currCategory: 0 - density: 80 + density: 2 dontReturn: false - EID: 143 Name: Piece1 @@ -9267,7 +9269,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9279,7 +9281,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} Friction: 0.400000006 @@ -9308,7 +9310,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9320,7 +9322,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} Friction: 0.400000006 @@ -9349,7 +9351,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9361,7 +9363,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} Friction: 0.400000006 @@ -9390,7 +9392,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9402,7 +9404,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} Friction: 0.400000006 @@ -9421,7 +9423,7 @@ - EID: 13 Name: ScoreZone IsActive: true - NumberOfChildren: 0 + NumberOfChildren: 1 Components: Transform Component: Translate: {x: 2.24178481, y: 1.4327563, z: 9.46397972} @@ -9457,10 +9459,33 @@ Scripts: - Type: ScoringZone Enabled: true +- EID: 18 + Name: CollisionWall + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0655272007, y: 0.127076745, z: -0.344656944} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 5 + Type: Box + Half Extents: {x: 1.79999995, y: 1, z: 0.200000003} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: ~ - EID: 14 Name: ScoreZone IsActive: true - NumberOfChildren: 0 + NumberOfChildren: 1 Components: Transform Component: Translate: {x: -0.5, y: 1.5, z: -5} @@ -9496,6 +9521,29 @@ Scripts: - Type: ScoringZone Enabled: true +- EID: 17 + Name: CollisionWall + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 5 + Type: Box + Half Extents: {x: 1, y: 1.5, 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: ~ - EID: 238 Name: ====GameManager==== IsActive: true @@ -9592,7 +9640,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: true @@ -9604,7 +9652,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 2 Type: Box Half Extents: {x: 0.400000006, y: 0.5, z: 0.300000012} Friction: 0.400000006 @@ -9736,7 +9784,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9748,7 +9796,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.200000003, y: 0.100000001, z: 0.200000003} Friction: 0.400000006 @@ -9762,6 +9810,7 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false + print: false - EID: 196 Name: Piece1 IsActive: true @@ -9781,7 +9830,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9793,7 +9842,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -9822,7 +9871,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9834,7 +9883,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.200000003} Friction: 0.400000006 @@ -9863,7 +9912,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9875,7 +9924,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -9904,7 +9953,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9916,7 +9965,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -9945,7 +9994,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -9957,7 +10006,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.200000003, y: 0.100000001, z: 0.200000003} Friction: 0.400000006 @@ -9971,6 +10020,7 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false + print: false - EID: 65703 Name: Piece1 IsActive: true @@ -9990,7 +10040,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10002,7 +10052,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -10031,7 +10081,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10043,7 +10093,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.200000003} Friction: 0.400000006 @@ -10072,7 +10122,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10084,7 +10134,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -10113,7 +10163,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10125,7 +10175,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -10154,7 +10204,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10166,7 +10216,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.200000003, y: 0.100000001, z: 0.200000003} Friction: 0.400000006 @@ -10180,6 +10230,7 @@ Enabled: true threshHold: 0.100000001 ignoreRaccoon: false + print: false - EID: 65708 Name: Piece1 IsActive: true @@ -10199,7 +10250,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10211,7 +10262,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -10240,7 +10291,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10252,7 +10303,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.200000003} Friction: 0.400000006 @@ -10281,7 +10332,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10293,7 +10344,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 @@ -10322,7 +10373,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -10334,7 +10385,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 1 + Collision Tag: 4 Type: Box Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006} Friction: 0.400000006 diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index b5837b9a..54208e8b 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -1,7 +1,7 @@ - EID: 0 Name: Canvas IsActive: true - NumberOfChildren: 1 + NumberOfChildren: 3 Components: Canvas Component: Canvas Width: 1920 @@ -9,7 +9,7 @@ IsActive: true Scripts: ~ - EID: 1 - Name: Default + Name: Background IsActive: true NumberOfChildren: 0 Components: @@ -22,7 +22,61 @@ Mesh: 141771688 Material: 121834459 IsActive: true + UI Component: + Canvas ID: 0 + 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 + UI Component: + Canvas ID: 0 + IsActive: true + Scripts: + - Type: ChangeSceneButton + Enabled: true + sceneID: 96668835 +- 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 + UI Component: + Canvas ID: 0 + IsActive: true + Scripts: + - Type: QuitButton + Enabled: true - EID: 2 Name: Light 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/Gameplay/Item/SC_Breakable.cs b/Assets/Scripts/Gameplay/Item/SC_Breakable.cs index 7902dfa3..45a2230e 100644 --- a/Assets/Scripts/Gameplay/Item/SC_Breakable.cs +++ b/Assets/Scripts/Gameplay/Item/SC_Breakable.cs @@ -13,6 +13,7 @@ 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() { @@ -46,6 +47,9 @@ public class Breakable : Script if (ignoreRaccoon && info.GameObject.GetScript()) return; + if (print) + Debug.Log($"{info.GameObject.Name}"); + if (rb.LinearVelocity.GetSqrMagnitude() > threshHold && !info.GameObject.GetScript()) { isBreak = true; diff --git a/Assets/Scripts/Gameplay/SC_ScoringZone.cs b/Assets/Scripts/Gameplay/SC_ScoringZone.cs index f4094cb8..0d465854 100644 --- a/Assets/Scripts/Gameplay/SC_ScoringZone.cs +++ b/Assets/Scripts/Gameplay/SC_ScoringZone.cs @@ -11,11 +11,11 @@ public class ScoringZone : Script protected override void onTriggerEnter(CollisionInfo info) { - if (GameManager.Instance && info.GameObject.GetScript()) + if (GameManager.Instance && info.GameObject.GetScript() && info.GameObject.IsActiveSelf) { - AudioHandler.audioClipHandlers["SFXItemScore"].Play(); - GameManager.Instance.ItemScored(); + Audio.PlaySFXOnce2D("event:/Music/stingers/item_scored"); GameManager.Instance.Score += info.GameObject.GetScript().Score * GameManager.Instance.currMultiplierCombo; + GameManager.Instance.ItemScored(); info.GameObject.SetActive(false); } } diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs b/Assets/Scripts/UI/SC_ChangeSceneButton.cs new file mode 100644 index 00000000..6caba2b1 --- /dev/null +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs @@ -0,0 +1,33 @@ +鏤using System; +using SHADE; + +public class ChangeSceneButton : Script +{ + public uint sceneID = 0; + + + protected override void start() + { + UIElement ui = GetComponent(); + if (ui != null) + { + ui.OnClick.RegisterAction(() => + { + if (sceneID != 0) + { + Audio.PlaySFXOnce2D("event:/UI/success"); + SceneManager.ChangeScene(sceneID); + Audio.StopAllSounds(); + } + }); + } + else + { + Debug.LogError("Failed to register button action for ChangeSceneButton."); + } + } + 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/Scripts/UI/SC_QuitButton.cs b/Assets/Scripts/UI/SC_QuitButton.cs new file mode 100644 index 00000000..48d2780a --- /dev/null +++ b/Assets/Scripts/UI/SC_QuitButton.cs @@ -0,0 +1,31 @@ +鏤using System; +using SHADE; + +public class QuitButton : Script +{ + protected override void start() + { + UIElement ui = GetComponent(); + if (ui != null) + { + ui.OnClick.RegisterAction(() => + { + ui.OnClick.RegisterAction(() => + { + Audio.StopAllSounds(); + Application.Quit(); + }); + + }); + } + else + { + Debug.LogError("Failed to register button action for QuitButton."); + } + + } + 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 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 ce1dd7e9..024d0a3d 100644 Binary files a/Assets/Shaders/UI_FS.shshaderb and b/Assets/Shaders/UI_FS.shshaderb differ diff --git a/Assets/Texture/Buttons/howToPlay_default.dds b/Assets/Texture/Buttons/howToPlay_default.dds new file mode 100644 index 00000000..b29bb336 Binary files /dev/null and b/Assets/Texture/Buttons/howToPlay_default.dds differ diff --git a/Assets/Texture/Buttons/howToPlay_default.shtex b/Assets/Texture/Buttons/howToPlay_default.shtex new file mode 100644 index 00000000..44fd4ab9 Binary files /dev/null and b/Assets/Texture/Buttons/howToPlay_default.shtex differ diff --git a/Assets/Texture/Buttons/howToPlay_default.shtex.shmeta b/Assets/Texture/Buttons/howToPlay_default.shtex.shmeta new file mode 100644 index 00000000..da1023a1 --- /dev/null +++ b/Assets/Texture/Buttons/howToPlay_default.shtex.shmeta @@ -0,0 +1,3 @@ +Name: howToPlay_default +ID: 65084899 +Type: 3 diff --git a/Assets/Texture/Buttons/howToPlay_hover.dds b/Assets/Texture/Buttons/howToPlay_hover.dds new file mode 100644 index 00000000..1d59d29b Binary files /dev/null and b/Assets/Texture/Buttons/howToPlay_hover.dds differ diff --git a/Assets/Texture/Buttons/howToPlay_hover.shtex b/Assets/Texture/Buttons/howToPlay_hover.shtex new file mode 100644 index 00000000..daafd0ac Binary files /dev/null and b/Assets/Texture/Buttons/howToPlay_hover.shtex differ diff --git a/Assets/Texture/Buttons/howToPlay_hover.shtex.shmeta b/Assets/Texture/Buttons/howToPlay_hover.shtex.shmeta new file mode 100644 index 00000000..044046c3 --- /dev/null +++ b/Assets/Texture/Buttons/howToPlay_hover.shtex.shmeta @@ -0,0 +1,3 @@ +Name: howToPlay_hover +ID: 58647112 +Type: 3 diff --git a/Assets/Texture/Buttons/howToPlay_pressed.dds b/Assets/Texture/Buttons/howToPlay_pressed.dds new file mode 100644 index 00000000..08f50be5 Binary files /dev/null and b/Assets/Texture/Buttons/howToPlay_pressed.dds differ diff --git a/Assets/Texture/Buttons/howToPlay_pressed.shtex b/Assets/Texture/Buttons/howToPlay_pressed.shtex new file mode 100644 index 00000000..15396e92 Binary files /dev/null and b/Assets/Texture/Buttons/howToPlay_pressed.shtex differ diff --git a/Assets/Texture/Buttons/howToPlay_pressed.shtex.shmeta b/Assets/Texture/Buttons/howToPlay_pressed.shtex.shmeta new file mode 100644 index 00000000..96ea8621 --- /dev/null +++ b/Assets/Texture/Buttons/howToPlay_pressed.shtex.shmeta @@ -0,0 +1,3 @@ +Name: howToPlay_pressed +ID: 55758383 +Type: 3 diff --git a/Assets/Texture/Buttons/mainMenu_default.dds b/Assets/Texture/Buttons/mainMenu_default.dds new file mode 100644 index 00000000..d06e997a Binary files /dev/null and b/Assets/Texture/Buttons/mainMenu_default.dds differ diff --git a/Assets/Texture/Buttons/mainMenu_default.shtex b/Assets/Texture/Buttons/mainMenu_default.shtex new file mode 100644 index 00000000..552473a2 Binary files /dev/null and b/Assets/Texture/Buttons/mainMenu_default.shtex differ diff --git a/Assets/Texture/Buttons/mainMenu_default.shtex.shmeta b/Assets/Texture/Buttons/mainMenu_default.shtex.shmeta new file mode 100644 index 00000000..04b06d0d --- /dev/null +++ b/Assets/Texture/Buttons/mainMenu_default.shtex.shmeta @@ -0,0 +1,3 @@ +Name: mainMenu_default +ID: 65788519 +Type: 3 diff --git a/Assets/Texture/Buttons/mainMenu_hover.dds b/Assets/Texture/Buttons/mainMenu_hover.dds new file mode 100644 index 00000000..3c30985a Binary files /dev/null and b/Assets/Texture/Buttons/mainMenu_hover.dds differ diff --git a/Assets/Texture/Buttons/mainMenu_hover.shtex b/Assets/Texture/Buttons/mainMenu_hover.shtex new file mode 100644 index 00000000..1b54850b Binary files /dev/null and b/Assets/Texture/Buttons/mainMenu_hover.shtex differ diff --git a/Assets/Texture/Buttons/mainMenu_hover.shtex.shmeta b/Assets/Texture/Buttons/mainMenu_hover.shtex.shmeta new file mode 100644 index 00000000..f0a7cc7f --- /dev/null +++ b/Assets/Texture/Buttons/mainMenu_hover.shtex.shmeta @@ -0,0 +1,3 @@ +Name: mainMenu_hover +ID: 55999018 +Type: 3 diff --git a/Assets/Texture/Buttons/mainMenu_pressed.dds b/Assets/Texture/Buttons/mainMenu_pressed.dds new file mode 100644 index 00000000..b384e5c2 Binary files /dev/null and b/Assets/Texture/Buttons/mainMenu_pressed.dds differ diff --git a/Assets/Texture/Buttons/mainMenu_pressed.shtex b/Assets/Texture/Buttons/mainMenu_pressed.shtex new file mode 100644 index 00000000..1f39d443 Binary files /dev/null and b/Assets/Texture/Buttons/mainMenu_pressed.shtex differ diff --git a/Assets/Texture/Buttons/mainMenu_pressed.shtex.shmeta b/Assets/Texture/Buttons/mainMenu_pressed.shtex.shmeta new file mode 100644 index 00000000..75dd4050 --- /dev/null +++ b/Assets/Texture/Buttons/mainMenu_pressed.shtex.shmeta @@ -0,0 +1,3 @@ +Name: mainMenu_pressed +ID: 66382894 +Type: 3 diff --git a/Assets/Texture/Buttons/quit_default.dds b/Assets/Texture/Buttons/quit_default.dds new file mode 100644 index 00000000..52b3e518 Binary files /dev/null and b/Assets/Texture/Buttons/quit_default.dds differ diff --git a/Assets/Texture/Buttons/quit_default.shtex b/Assets/Texture/Buttons/quit_default.shtex new file mode 100644 index 00000000..96bbc662 Binary files /dev/null and b/Assets/Texture/Buttons/quit_default.shtex differ diff --git a/Assets/Texture/Buttons/quit_default.shtex.shmeta b/Assets/Texture/Buttons/quit_default.shtex.shmeta new file mode 100644 index 00000000..38aab052 --- /dev/null +++ b/Assets/Texture/Buttons/quit_default.shtex.shmeta @@ -0,0 +1,3 @@ +Name: quit_default +ID: 66477839 +Type: 3 diff --git a/Assets/Texture/Buttons/quit_hover.dds b/Assets/Texture/Buttons/quit_hover.dds new file mode 100644 index 00000000..fb2c84c8 Binary files /dev/null and b/Assets/Texture/Buttons/quit_hover.dds differ diff --git a/Assets/Texture/Buttons/quit_hover.shtex b/Assets/Texture/Buttons/quit_hover.shtex new file mode 100644 index 00000000..766a41bd Binary files /dev/null and b/Assets/Texture/Buttons/quit_hover.shtex differ diff --git a/Assets/Texture/Buttons/quit_hover.shtex.shmeta b/Assets/Texture/Buttons/quit_hover.shtex.shmeta new file mode 100644 index 00000000..1023cd6d --- /dev/null +++ b/Assets/Texture/Buttons/quit_hover.shtex.shmeta @@ -0,0 +1,3 @@ +Name: quit_hover +ID: 65045286 +Type: 3 diff --git a/Assets/Texture/Buttons/quit_pressed.dds b/Assets/Texture/Buttons/quit_pressed.dds new file mode 100644 index 00000000..ab9754d2 Binary files /dev/null and b/Assets/Texture/Buttons/quit_pressed.dds differ diff --git a/Assets/Texture/Buttons/quit_pressed.shtex b/Assets/Texture/Buttons/quit_pressed.shtex new file mode 100644 index 00000000..afc2662f Binary files /dev/null and b/Assets/Texture/Buttons/quit_pressed.shtex differ diff --git a/Assets/Texture/Buttons/quit_pressed.shtex.shmeta b/Assets/Texture/Buttons/quit_pressed.shtex.shmeta new file mode 100644 index 00000000..75d38cdc --- /dev/null +++ b/Assets/Texture/Buttons/quit_pressed.shtex.shmeta @@ -0,0 +1,3 @@ +Name: quit_pressed +ID: 58607560 +Type: 3 diff --git a/Assets/Texture/Buttons/retry_default.dds b/Assets/Texture/Buttons/retry_default.dds new file mode 100644 index 00000000..373d9792 Binary files /dev/null and b/Assets/Texture/Buttons/retry_default.dds differ diff --git a/Assets/Texture/Buttons/retry_default.shtex b/Assets/Texture/Buttons/retry_default.shtex new file mode 100644 index 00000000..f64dcbd3 Binary files /dev/null and b/Assets/Texture/Buttons/retry_default.shtex differ diff --git a/Assets/Texture/Buttons/retry_default.shtex.shmeta b/Assets/Texture/Buttons/retry_default.shtex.shmeta new file mode 100644 index 00000000..e8e00bea --- /dev/null +++ b/Assets/Texture/Buttons/retry_default.shtex.shmeta @@ -0,0 +1,3 @@ +Name: retry_default +ID: 55782622 +Type: 3 diff --git a/Assets/Texture/Buttons/retry_hover.dds b/Assets/Texture/Buttons/retry_hover.dds new file mode 100644 index 00000000..e8d25717 Binary files /dev/null and b/Assets/Texture/Buttons/retry_hover.dds differ diff --git a/Assets/Texture/Buttons/retry_hover.shtex b/Assets/Texture/Buttons/retry_hover.shtex new file mode 100644 index 00000000..f5e30205 Binary files /dev/null and b/Assets/Texture/Buttons/retry_hover.shtex differ diff --git a/Assets/Texture/Buttons/retry_hover.shtex.shmeta b/Assets/Texture/Buttons/retry_hover.shtex.shmeta new file mode 100644 index 00000000..8c26fe21 --- /dev/null +++ b/Assets/Texture/Buttons/retry_hover.shtex.shmeta @@ -0,0 +1,3 @@ +Name: retry_hover +ID: 58972174 +Type: 3 diff --git a/Assets/Texture/Buttons/retry_pressed.dds b/Assets/Texture/Buttons/retry_pressed.dds new file mode 100644 index 00000000..d0f90c99 Binary files /dev/null and b/Assets/Texture/Buttons/retry_pressed.dds differ diff --git a/Assets/Texture/Buttons/retry_pressed.shtex b/Assets/Texture/Buttons/retry_pressed.shtex new file mode 100644 index 00000000..fb134ec9 Binary files /dev/null and b/Assets/Texture/Buttons/retry_pressed.shtex differ diff --git a/Assets/Texture/Buttons/retry_pressed.shtex.shmeta b/Assets/Texture/Buttons/retry_pressed.shtex.shmeta new file mode 100644 index 00000000..2f9fd295 --- /dev/null +++ b/Assets/Texture/Buttons/retry_pressed.shtex.shmeta @@ -0,0 +1,3 @@ +Name: retry_pressed +ID: 55224464 +Type: 3 diff --git a/Assets/Texture/Buttons/settings_default.dds b/Assets/Texture/Buttons/settings_default.dds new file mode 100644 index 00000000..7c37be34 Binary files /dev/null and b/Assets/Texture/Buttons/settings_default.dds differ diff --git a/Assets/Texture/Buttons/settings_default.shtex b/Assets/Texture/Buttons/settings_default.shtex new file mode 100644 index 00000000..126499fd Binary files /dev/null and b/Assets/Texture/Buttons/settings_default.shtex differ diff --git a/Assets/Texture/Buttons/settings_default.shtex.shmeta b/Assets/Texture/Buttons/settings_default.shtex.shmeta new file mode 100644 index 00000000..2c3121ce --- /dev/null +++ b/Assets/Texture/Buttons/settings_default.shtex.shmeta @@ -0,0 +1,3 @@ +Name: settings_default +ID: 58593104 +Type: 3 diff --git a/Assets/Texture/Buttons/settings_hover.dds b/Assets/Texture/Buttons/settings_hover.dds new file mode 100644 index 00000000..88269cac Binary files /dev/null and b/Assets/Texture/Buttons/settings_hover.dds differ diff --git a/Assets/Texture/Buttons/settings_hover.shtex b/Assets/Texture/Buttons/settings_hover.shtex new file mode 100644 index 00000000..32955a83 Binary files /dev/null and b/Assets/Texture/Buttons/settings_hover.shtex differ diff --git a/Assets/Texture/Buttons/settings_hover.shtex.shmeta b/Assets/Texture/Buttons/settings_hover.shtex.shmeta new file mode 100644 index 00000000..061eb51d --- /dev/null +++ b/Assets/Texture/Buttons/settings_hover.shtex.shmeta @@ -0,0 +1,3 @@ +Name: settings_hover +ID: 64495732 +Type: 3 diff --git a/Assets/Texture/Buttons/settings_pressed.dds b/Assets/Texture/Buttons/settings_pressed.dds new file mode 100644 index 00000000..c038bcdc Binary files /dev/null and b/Assets/Texture/Buttons/settings_pressed.dds differ diff --git a/Assets/Texture/Buttons/settings_pressed.shtex b/Assets/Texture/Buttons/settings_pressed.shtex new file mode 100644 index 00000000..0342170a Binary files /dev/null and b/Assets/Texture/Buttons/settings_pressed.shtex differ diff --git a/Assets/Texture/Buttons/settings_pressed.shtex.shmeta b/Assets/Texture/Buttons/settings_pressed.shtex.shmeta new file mode 100644 index 00000000..e2007e10 --- /dev/null +++ b/Assets/Texture/Buttons/settings_pressed.shtex.shmeta @@ -0,0 +1,3 @@ +Name: settings_pressed +ID: 63138015 +Type: 3 diff --git a/Assets/Texture/Buttons/startGame_default.dds b/Assets/Texture/Buttons/startGame_default.dds new file mode 100644 index 00000000..f8ece9bb Binary files /dev/null and b/Assets/Texture/Buttons/startGame_default.dds differ diff --git a/Assets/Texture/Buttons/startGame_default.shtex b/Assets/Texture/Buttons/startGame_default.shtex new file mode 100644 index 00000000..174eca7d Binary files /dev/null and b/Assets/Texture/Buttons/startGame_default.shtex differ diff --git a/Assets/Texture/Buttons/startGame_default.shtex.shmeta b/Assets/Texture/Buttons/startGame_default.shtex.shmeta new file mode 100644 index 00000000..6dd0376f --- /dev/null +++ b/Assets/Texture/Buttons/startGame_default.shtex.shmeta @@ -0,0 +1,3 @@ +Name: startGame_default +ID: 52901020 +Type: 3 diff --git a/Assets/Texture/Buttons/startGame_hover.dds b/Assets/Texture/Buttons/startGame_hover.dds new file mode 100644 index 00000000..aedcab05 Binary files /dev/null and b/Assets/Texture/Buttons/startGame_hover.dds differ diff --git a/Assets/Texture/Buttons/startGame_hover.shtex b/Assets/Texture/Buttons/startGame_hover.shtex new file mode 100644 index 00000000..61abe918 Binary files /dev/null and b/Assets/Texture/Buttons/startGame_hover.shtex differ diff --git a/Assets/Texture/Buttons/startGame_hover.shtex.shmeta b/Assets/Texture/Buttons/startGame_hover.shtex.shmeta new file mode 100644 index 00000000..881b34f9 --- /dev/null +++ b/Assets/Texture/Buttons/startGame_hover.shtex.shmeta @@ -0,0 +1,3 @@ +Name: startGame_hover +ID: 62235279 +Type: 3 diff --git a/Assets/Texture/Buttons/startGame_pressed.dds b/Assets/Texture/Buttons/startGame_pressed.dds new file mode 100644 index 00000000..a915be85 Binary files /dev/null and b/Assets/Texture/Buttons/startGame_pressed.dds differ diff --git a/Assets/Texture/Buttons/startGame_pressed.shtex b/Assets/Texture/Buttons/startGame_pressed.shtex new file mode 100644 index 00000000..1dcc8ba3 Binary files /dev/null and b/Assets/Texture/Buttons/startGame_pressed.shtex differ diff --git a/Assets/Texture/Buttons/startGame_pressed.shtex.shmeta b/Assets/Texture/Buttons/startGame_pressed.shtex.shmeta new file mode 100644 index 00000000..05314b21 --- /dev/null +++ b/Assets/Texture/Buttons/startGame_pressed.shtex.shmeta @@ -0,0 +1,3 @@ +Name: startGame_pressed +ID: 64722619 +Type: 3 diff --git a/Assets/Texture/TX_LoseScene.dds b/Assets/Texture/TX_LoseScene.dds index e6430c46..796b460d 100644 Binary files a/Assets/Texture/TX_LoseScene.dds and b/Assets/Texture/TX_LoseScene.dds differ diff --git a/Assets/Texture/TX_LoseScene.shtex b/Assets/Texture/TX_LoseScene.shtex index e4b9ea83..a7759954 100644 Binary files a/Assets/Texture/TX_LoseScene.shtex and b/Assets/Texture/TX_LoseScene.shtex differ diff --git a/Assets/Texture/TX_MainMenu.dds b/Assets/Texture/TX_MainMenu.dds index 250b431d..93b5112d 100644 Binary files a/Assets/Texture/TX_MainMenu.dds and b/Assets/Texture/TX_MainMenu.dds differ diff --git a/Assets/Texture/TX_MainMenu.shtex b/Assets/Texture/TX_MainMenu.shtex index 2370006f..f7c19f5a 100644 Binary files a/Assets/Texture/TX_MainMenu.shtex and b/Assets/Texture/TX_MainMenu.shtex differ diff --git a/Assets/Texture/TX_WinScene.dds b/Assets/Texture/TX_WinScene.dds index 64f7e679..f37da6bb 100644 Binary files a/Assets/Texture/TX_WinScene.dds and b/Assets/Texture/TX_WinScene.dds differ diff --git a/Assets/Texture/TX_WinScene.shtex b/Assets/Texture/TX_WinScene.shtex index 45967704..a8354a42 100644 Binary files a/Assets/Texture/TX_WinScene.shtex and b/Assets/Texture/TX_WinScene.shtex differ diff --git a/SHADE_CSharp/src/Events/CallbackEvent.cs b/SHADE_CSharp/src/Events/CallbackEvent.cs index 2c3cc388..44209288 100644 --- a/SHADE_CSharp/src/Events/CallbackEvent.cs +++ b/SHADE_CSharp/src/Events/CallbackEvent.cs @@ -117,10 +117,11 @@ namespace SHADE /// public void Invoke() { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(); } catch (Exception e) @@ -203,10 +204,11 @@ namespace SHADE /// public void Invoke(T1 t1) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1); } catch (Exception e) @@ -289,10 +291,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2); } catch (Exception e) @@ -375,10 +378,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3); } catch (Exception e) @@ -461,10 +465,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3, T4 t4) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3, t4); } catch (Exception e) @@ -547,10 +552,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3, t4, t5); } catch (Exception e) @@ -633,10 +639,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3, t4, t5, t6); } catch (Exception e) @@ -719,10 +726,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3, t4, t5, t6, t7); } catch (Exception e) @@ -805,10 +813,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3, t4, t5, t6, t7, t8); } catch (Exception e) @@ -891,10 +900,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3, t4, t5, t6, t7, t8, t9); } catch (Exception e) @@ -977,10 +987,11 @@ namespace SHADE /// public void Invoke(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10) { - foreach (CallbackAction action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction; action.Invoke(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); } catch (Exception e) diff --git a/SHADE_CSharp/src/Events/CallbackEvent.tt b/SHADE_CSharp/src/Events/CallbackEvent.tt index 66a8b6d9..8d903d0f 100644 --- a/SHADE_CSharp/src/Events/CallbackEvent.tt +++ b/SHADE_CSharp/src/Events/CallbackEvent.tt @@ -134,10 +134,11 @@ namespace SHADE /// public void Invoke(<# if (i != 0) { for (int t = 1; t < i + 1; ++t) { #>T<#=t#> t<#=t#><# if (t != i) { #>, <# } #><# } } #>) { - foreach (CallbackAction<# if (i != 0) { #><<# for (int t = 1; t < i + 1; ++t) { #>T<#=t#><# if (t != i) { #>, <# } #><# } #>><# } #> action in actions) + for (int i = 0; i < actions.Count; ++i) { try { + var action = actions[i] as CallbackAction<# if (i != 0) { #><<# for (int t = 1; t < i + 1; ++t) { #>T<#=t#><# if (t != i) { #>, <# } #><# } #>><# } #>; action.Invoke(<# for (int t = 1; t < i + 1; ++t) { #>t<#=t#><# if (t != i) { #>, <# } #><# } #>); } catch (Exception e) diff --git a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp index 97d9a34b..aa64e673 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/ColliderTagPanel/SHColliderTagPanel.cpp @@ -50,7 +50,14 @@ namespace SHADE ImGui::TableNextColumn(); ImGui::PushID(i); - SHEditorWidgets::InputText("##", [i]{return SHCollisionTagMatrix::GetTagName(i);}, [i](std::string const& value){SHCollisionTagMatrix::GetTag(i)->SetName(value);}, tagName.data(), ImGuiInputTextFlags_EnterReturnsTrue); + if (SHEditorWidgets::InputText("##", [i]{return SHCollisionTagMatrix::GetTagName(i);}, [i](std::string const& value){SHCollisionTagMatrix::GetTag(i)->SetName(value);}, tagName.data(), ImGuiInputTextFlags_EnterReturnsTrue)) + { + isDirty = true; + std::filesystem::path defaultCollisionTagNameFilePath{ ASSET_ROOT }; + defaultCollisionTagNameFilePath.append("CollisionTags.SHConfig"); + SHCollisionTagMatrix::SaveToFile(defaultCollisionTagNameFilePath); + } + ImGui::PopID(); // The checkboxes are just to set the layers of each tag @@ -60,10 +67,13 @@ namespace SHADE { ImGui::TableNextColumn(); - std::string label = std::format("##{}, Layer {}", tagName, j); + std::string label = std::format("##{}, Layer {}", tagName, j+1); if (SHEditorWidgets::CheckBox(label, [tag, &j] {return tag->GetLayerState(j); }, [tag, j](bool const& value) {tag->SetLayerState(j, value); }, label.substr(2))) { isDirty = true; + std::filesystem::path defaultCollisionTagNameFilePath{ ASSET_ROOT }; + defaultCollisionTagNameFilePath.append("CollisionTags.SHConfig"); + SHCollisionTagMatrix::SaveToFile(defaultCollisionTagNameFilePath); } } } diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp index a050894c..31cd0dfc 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp @@ -199,7 +199,7 @@ namespace SHADE // Check material usage for (const auto& rendId : sb.Renderables) { - auto rend = SHComponentManager::GetComponent(rendId); + auto rend = SHComponentManager::GetComponent_s(rendId); if (rend) { if (rend->GetMaterial() == matToCheck) @@ -210,7 +210,7 @@ namespace SHADE } else { - SHLOG_WARNING("[SHBatch] Entity with a missing SHRenderable found!"); + SHLOG_WARNING("[SHBatch] Entity #{} with a missing SHRenderable found!", rendId); } } } @@ -290,20 +290,20 @@ namespace SHADE // Build CPU Buffer char* propsCurrPtr = matPropsData.get(); for (auto& subBatch : subBatches) - for (auto rendId : subBatch.Renderables) + for (auto rendId : subBatch.Renderables) + { + const SHRenderable* renderable = SHComponentManager::GetComponent_s(rendId); + if (renderable) { - const SHRenderable* renderable = SHComponentManager::GetComponent(rendId); - if (renderable) - { - renderable->GetMaterial()->ExportProperties(propsCurrPtr); - } - else - { - SHLOG_WARNING("[SHBatch] Entity with a missing SHRenderable found!"); - } - //propsCurrPtr += singleMatPropAlignedSize; - propsCurrPtr += singleMatPropSize; + renderable->GetMaterial()->ExportProperties(propsCurrPtr); } + else + { + SHLOG_WARNING("[SHBatch] Entity #{} with a missing SHRenderable found!", rendId); + } + //propsCurrPtr += singleMatPropAlignedSize; + propsCurrPtr += singleMatPropSize; + } // Transfer to GPU rebuildDescriptorSetBuffers(frameIndex, descPool); @@ -328,7 +328,7 @@ namespace SHADE for (auto rendId : subBatch.Renderables) { // Transform - auto transform = SHComponentManager::GetComponent(rendId); + auto transform = SHComponentManager::GetComponent_s(rendId); if (transform) { if (SHSceneManager::CheckNodeAndComponentsActive(rendId)) @@ -357,7 +357,7 @@ namespace SHADE } else { - SHLOG_WARNING("[SHBatch] Entity contianing a SHRenderable with no SHTransformComponent found!"); + SHLOG_WARNING("[SHBatch] Entity #{} containing a SHRenderable with no SHTransformComponent found!", rendId); transformData.emplace_back(); } } @@ -382,12 +382,15 @@ namespace SHADE for (auto& subBatch : subBatches) for (auto rendId : subBatch.Renderables) { - auto* renderable = SHComponentManager::GetComponent(rendId); - instancedIntegerData.emplace_back(SHInstancedIntegerData + auto* renderable = SHComponentManager::GetComponent_s(rendId); + if (renderable) { - rendId, - renderable->GetLightLayer() - }); + instancedIntegerData.emplace_back(SHInstancedIntegerData + { + rendId, + renderable->GetLightLayer() + }); + } } // Transfer to GPU @@ -575,17 +578,21 @@ namespace SHADE } else { - SHLOG_WARNING("[SHBatch] Entity contianing a SHRenderable with no SHTransformComponent found!"); + SHLOG_WARNING("[SHBatch] Entity #{} contianing a SHRenderable with no SHTransformComponent found!", rendId); transformData.emplace_back(); } - const SHRenderable* renderable = SHComponentManager::GetComponent(rendId); - instancedIntegerData.emplace_back(SHInstancedIntegerData - { - rendId, - renderable->GetLightLayer() - } - ); + const SHRenderable* renderable = SHComponentManager::GetComponent_s(rendId); + if (renderable) + { + instancedIntegerData.emplace_back(SHInstancedIntegerData + { + rendId, + renderable->GetLightLayer() + } + ); + } + // Material Properties if (!EMPTY_MAT_PROPS) @@ -596,7 +603,7 @@ namespace SHADE } else { - SHLOG_WARNING("[SHBatch] Entity with a missing SHRenderable found!"); + SHLOG_WARNING("[SHBatch] Entity #{} with a missing SHRenderable found!", rendId); } propsCurrPtr += singleMatPropSize; } diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index 99685585..5ebc6487 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -1065,7 +1065,7 @@ namespace SHADE for (auto& renderable : renderables) { // Check if the material instance is now unused - renderable.CleanUpMaterials(); + renderable.CleanUpMaterials(); if (!renderable.HasChanged()) continue; diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderable.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderable.cpp index d3518e67..8d02a84a 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderable.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderable.cpp @@ -99,6 +99,8 @@ namespace SHADE { SHGraphicsSystem* gfxSystem = SHSystemManager::GetSystem(); material = gfxSystem->AddMaterialInstanceCopy(sharedMaterial); + oldMaterial = sharedMaterial; + oldMatIsShared = true; matChanged = true; } diff --git a/SHADE_Engine/src/Serialization/SHSerialization.cpp b/SHADE_Engine/src/Serialization/SHSerialization.cpp index a5daf644..bb0f4a43 100644 --- a/SHADE_Engine/src/Serialization/SHSerialization.cpp +++ b/SHADE_Engine/src/Serialization/SHSerialization.cpp @@ -205,6 +205,7 @@ namespace SHADE AddComponentToComponentNode(components, eid); AddComponentToComponentNode(components, eid); + AddComponentToComponentNode(components, eid); node[ComponentsNode] = components; @@ -263,6 +264,7 @@ namespace SHADE AddComponentID(componentIDList, componentsNode); AddComponentID(componentIDList, componentsNode); AddComponentID(componentIDList, componentsNode); + AddComponentID(componentIDList, componentsNode); return componentIDList; } @@ -347,5 +349,6 @@ namespace SHADE SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); + SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); } } diff --git a/SHADE_Engine/src/Serialization/SHYAMLConverters.h b/SHADE_Engine/src/Serialization/SHYAMLConverters.h index 6c019874..9fceb10d 100644 --- a/SHADE_Engine/src/Serialization/SHYAMLConverters.h +++ b/SHADE_Engine/src/Serialization/SHYAMLConverters.h @@ -137,7 +137,7 @@ namespace YAML Node node; node[IsTrigger] = rhs.IsTrigger(); - node[CollisionTag] = rhs.GetCollisionTag().GetName(); + node[CollisionTag] = SHCollisionTagMatrix::GetTagIndex(rhs.GetCollisionTag().GetName()); rttr::type const shapeRttrType = rttr::type::get(); rttr::enumeration const enumAlign = shapeRttrType.get_enumeration(); SHCollisionShape::Type colliderType = rhs.GetType(); @@ -176,7 +176,7 @@ namespace YAML rhs.SetIsTrigger(node[IsTrigger].as()); if(node[CollisionTag].IsDefined()) - rhs.SetCollisionTag(SHCollisionTagMatrix::GetTag(node[CollisionTag].as())); + rhs.SetCollisionTag(SHCollisionTagMatrix::GetTag(node[CollisionTag].as())); if (!node[Type].IsDefined()) return false; diff --git a/SHADE_Engine/src/UI/SHButtonComponent.cpp b/SHADE_Engine/src/UI/SHButtonComponent.cpp index 8e87b10e..35b6b3bc 100644 --- a/SHADE_Engine/src/UI/SHButtonComponent.cpp +++ b/SHADE_Engine/src/UI/SHButtonComponent.cpp @@ -1,12 +1,13 @@ #include "SHpch.h" #include "SHButtonComponent.h" - +#include "Resource/SHResourceManager.h" +#include "Graphics/MiddleEnd/Textures/SHTextureLibrary.h" namespace SHADE { SHButtonComponent::SHButtonComponent() :size(1.0f), isHovered(false), isClicked(false), - defaultTexture(0), hoveredTexture(0), clickedTexture(0) + defaultTexture(0), hoveredTexture(0), clickedTexture(0), currentTexture(0) { } diff --git a/SHADE_Engine/src/UI/SHButtonComponent.h b/SHADE_Engine/src/UI/SHButtonComponent.h index 3aac09e6..bb66d224 100644 --- a/SHADE_Engine/src/UI/SHButtonComponent.h +++ b/SHADE_Engine/src/UI/SHButtonComponent.h @@ -40,6 +40,8 @@ namespace SHADE AssetID defaultTexture; AssetID hoveredTexture; AssetID clickedTexture; + + AssetID currentTexture; RTTR_ENABLE() diff --git a/SHADE_Engine/src/UI/SHToggleButtonComponent.cpp b/SHADE_Engine/src/UI/SHToggleButtonComponent.cpp index 527323ea..47df669c 100644 --- a/SHADE_Engine/src/UI/SHToggleButtonComponent.cpp +++ b/SHADE_Engine/src/UI/SHToggleButtonComponent.cpp @@ -6,7 +6,7 @@ namespace SHADE { SHToggleButtonComponent::SHToggleButtonComponent() :size(1.0f), isHovered(false), isClicked(false), value(false), - defaultTexture(0), toggledTexture(0) + defaultTexture(0), toggledTexture(0), currentTexture(0) { } diff --git a/SHADE_Engine/src/UI/SHToggleButtonComponent.h b/SHADE_Engine/src/UI/SHToggleButtonComponent.h index 2c77f3ba..dc678fe9 100644 --- a/SHADE_Engine/src/UI/SHToggleButtonComponent.h +++ b/SHADE_Engine/src/UI/SHToggleButtonComponent.h @@ -41,6 +41,8 @@ namespace SHADE bool value; AssetID defaultTexture; AssetID toggledTexture; + + AssetID currentTexture; diff --git a/SHADE_Engine/src/UI/SHUISystem.cpp b/SHADE_Engine/src/UI/SHUISystem.cpp index 9bd5ae43..92a754bf 100644 --- a/SHADE_Engine/src/UI/SHUISystem.cpp +++ b/SHADE_Engine/src/UI/SHUISystem.cpp @@ -28,6 +28,8 @@ namespace SHADE SHComponentManager::CreateComponentSparseSet(); SHComponentManager::CreateComponentSparseSet(); SHComponentManager::CreateComponentSparseSet(); + SHComponentManager::CreateComponentSparseSet(); + SHComponentManager::CreateComponentSparseSet(); } void SHUISystem::Exit() @@ -234,18 +236,23 @@ namespace SHADE auto renderable = SHComponentManager::GetComponent_s(comp.GetEID()); //auto texture = SHResourceManager::Get(comp.GetDefaultTexture()); - auto material = renderable->GetModifiableMaterial(); - if(!comp.isHovered && !comp.isClicked) - if (comp.GetDefaultTexture() != 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE) + + AssetID textureID = 0; + if (!comp.isHovered && !comp.isClicked) { - material->SetProperty("data.textureIndex", comp.GetDefaultTexture()); - //SHLOG_INFO("SETTING DEFAULT TEXTURE") - } + if (comp.GetDefaultTexture() != 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE) + { + textureID = comp.GetDefaultTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetDefaultTexture())); + //SHLOG_INFO("SETTING DEFAULT TEXTURE") + } + } else if (comp.isClicked) { if (comp.GetClickedTexture() != 0 && SHAssetManager::GetType(comp.GetClickedTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", comp.GetClickedTexture()); + textureID = comp.GetClickedTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetClickedTexture())); //SHLOG_INFO("SETTING CLICKED TEXTURE") } } @@ -253,10 +260,17 @@ namespace SHADE { if (comp.GetHoveredTexture() != 0 && SHAssetManager::GetType(comp.GetHoveredTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", 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)); + } @@ -272,6 +286,7 @@ namespace SHADE } auto cameraSystem = SHSystemManager::GetSystem(); auto uiComp = SHComponentManager::GetComponent(comp.GetEID()); + //auto canvasComp = SHComponentManager::GetComponent_s(uiComp->canvasID); SHVec4 topExtent4 = SHMatrix::Translate(-comp.size.x * 0.5f, comp.size.y * 0.5f, 0.0f) * uiComp->GetMatrix() * SHVec4(0.0f, 0.0f, 0.0f, 1.0f); SHVec4 btmExtent4 = SHMatrix::Translate(comp.size.x * 0.5f, -comp.size.y * 0.5f, 0.0f) * uiComp->GetMatrix() * SHVec4(0.0f, 0.0f, 0.0f, 1.0f); @@ -280,15 +295,15 @@ namespace SHADE SHVec2 topExtent{ topExtent4.x,topExtent4.y }; SHVec2 btmExtent{ btmExtent4.x,btmExtent4.y }; + SHVec2 mousePos; SHVec2 windowSize; - #ifdef SHEDITOR windowSize = SHEditorWindowManager::GetEditorWindow()->beginContentRegionAvailable; mousePos = SHEditorWindowManager::GetEditorWindow()->viewportMousePos; //mousePos.y = windowSize.y - mousePos.y; //SHLOG_INFO("mouse pos: {}, {}", mousePos.x, mousePos.y) - mousePos /= windowSize; + mousePos /= windowSize; //SHLOG_INFO("mouse pos normalized: {}, {}", mousePos.x, mousePos.y) @@ -305,21 +320,20 @@ namespace SHADE #endif SHVec2 camSize{ cameraSystem->GetCameraWidthHeight(0) }; + //SHLOG_INFO("TopExtent: {}, {}", topExtent.x, topExtent.y) - - - topExtent = CanvasToScreenPoint(topExtent,true); + topExtent = CanvasToScreenPoint(topExtent, true); btmExtent = CanvasToScreenPoint(btmExtent, true); + //SHLOG_INFO("TopExtent: {}, {} Btm Extent: {}, {}", topExtent.x, topExtent.y, btmExtent.x, btmExtent.y) - - comp.isClicked = false; + //comp.isClicked = false; if (mousePos.x >= topExtent.x && mousePos.x <= btmExtent.x && mousePos.y >= topExtent.y && mousePos.y <= btmExtent.y) { comp.isHovered = true; #ifdef SHEDITOR - if (SHSystemManager::GetSystem()->editorState == SHEditor::State::PLAY) + //if (SHSystemManager::GetSystem()->editorState == SHEditor::State::PLAY) { if (SHInputManager::GetKeyDown(SHInputManager::SH_KEYCODE::LMB)) { @@ -330,22 +344,22 @@ namespace SHADE if (SHInputManager::GetKeyDown(SHInputManager::SH_KEYCODE::LMB)) { comp.isClicked = true; - } + } #endif - } + + //SHLOG_INFO("HOVERED") + } else { comp.isHovered = false; + //SHLOG_INFO("NOT HOVERED") } - - if (comp.isClicked && SHInputManager::GetKeyUp(SHInputManager::SH_KEYCODE::LMB)) { comp.isClicked = false; comp.value = !comp.value; SHButtonClickEvent clickEvent; clickEvent.EID = comp.GetEID(); - clickEvent.value = comp.value; SHEventManager::BroadcastEvent(clickEvent, SH_BUTTON_CLICK_EVENT); } @@ -354,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", comp.GetDefaultTexture()); + textureID = comp.GetDefaultTexture(); + //material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet(comp.GetDefaultTexture())); //SHLOG_INFO("SETTING DEFAULT TEXTURE") } } @@ -367,11 +383,20 @@ namespace SHADE { if (comp.GetToggledTexture() != 0 && SHAssetManager::GetType(comp.GetToggledTexture()) == AssetType::TEXTURE) { - material->SetProperty("data.textureIndex", 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)); + } + + } } diff --git a/SHADE_Managed/premake5.lua b/SHADE_Managed/premake5.lua index 9253c81b..790e359c 100644 --- a/SHADE_Managed/premake5.lua +++ b/SHADE_Managed/premake5.lua @@ -103,19 +103,19 @@ project "SHADE_Managed" filter "configurations:Debug" symbols "On" - defines {"_DEBUG"} + defines {"_DEBUG", "SHEDITOR"} links{"librttr_core_d.lib"} links{"fmodstudioL_vc.lib", "fmodL_vc.lib"} filter "configurations:Release" optimize "On" - defines{"_RELEASE"} + defines{"_RELEASE", "SHEDITOR"} links{"librttr_core.lib"} links{"fmodstudio_vc.lib", "fmod_vc.lib"} filter "configurations:Publish" optimize "On" - defines{"_RELEASE"} + defines{"_RELEASE", "_PUBLISH"} links{"librttr_core.lib"} links{"fmodstudio_vc.lib", "fmod_vc.lib"}