From 6dcee04077c3a1341f7dc90b64b9eb566da27cdf Mon Sep 17 00:00:00 2001 From: Glence Date: Sat, 11 Mar 2023 02:19:42 +0800 Subject: [PATCH 1/3] remove unnecessary script --- Assets/Scenes/Level2.shade | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 4c2918a4..f6955c77 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -5535,13 +5535,7 @@ Canvas Height: 1080 Scale by canvas width: false IsActive: false - Scripts: - - Type: PauseMenu - Enabled: true - resumeBtn: 8 - retryBtn: 458 - quitBtn: 0 - canvas: 10 + Scripts: ~ - EID: 8 Name: ResumeButton IsActive: true -- 2.40.1 From 6bfa0d0eca15c1675e2ea7b248eb0fd9497ae1ed Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Sat, 11 Mar 2023 02:31:48 +0800 Subject: [PATCH 2/3] Fixed post build command for SHADE_CSharp --- SHADE_CSharp/premake5.lua | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/SHADE_CSharp/premake5.lua b/SHADE_CSharp/premake5.lua index c94bb438..4d5f798c 100644 --- a/SHADE_CSharp/premake5.lua +++ b/SHADE_CSharp/premake5.lua @@ -25,34 +25,25 @@ project "SHADE_CSharp" "SHADE_Engine" } + postbuildcommands + { + "xcopy /r /y /q \"$(OutputPath)net5.0\\SHADE_CSharp.xml\" \"%{outputdir}\"", + "xcopy /r /y /q \"$(OutputPath)net5.0\\SHADE_CSharp.pdb\" \"%{outputdir}\"" + } + warnings 'Extra' filter "configurations:Debug" symbols "On" defines {"_DEBUG"} - postbuildcommands - { - "xcopy /r /y /q \"$(SolutionDir)\\bin\\Debug\\net5.0\\SHADE_CSharp.xml\" \"%{outputdir}\"", - "xcopy /r /y /q \"$(SolutionDir)\\bin\\Debug\\net5.0\\SHADE_CSharp.pdb\" \"%{outputdir}\"" - } filter "configurations:Release" optimize "On" defines{"_RELEASE"} - postbuildcommands - { - "xcopy /r /y /q \"$(SolutionDir)\\bin\\Release\\net5.0\\SHADE_CSharp.xml\" \"%{outputdir}\"", - "xcopy /r /y /q \"$(SolutionDir)\\bin\\Release\\net5.0\\SHADE_CSharp.pdb\" \"%{outputdir}\"" - } filter "configurations:Publish" optimize "On" defines{"_RELEASE"} - postbuildcommands - { - "xcopy /r /y /q \"$(SolutionDir)\\bin\\Release\\net5.0\\SHADE_CSharp.xml\" \"%{outputdir}\"", - "xcopy /r /y /q \"$(SolutionDir)\\bin\\Release\\net5.0\\SHADE_CSharp.pdb\" \"%{outputdir}\"" - } require "vstudio" -- 2.40.1 From b7520b683629cfcd53ba26a0f7b50ac502f197f0 Mon Sep 17 00:00:00 2001 From: Glence Date: Sat, 11 Mar 2023 11:07:21 +0800 Subject: [PATCH 3/3] added animation for the other scenes --- Assets/Scenes/Level2.shade | 34 +++++++++++++++++-- Assets/Scenes/Level3.shade | 34 +++++++++++++++++-- .../Player/PlayerStates/UT_PlayerJumpState.cs | 2 +- .../Gameplay/Player/SC_PlayerController.cs | 12 ++++++- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index f6955c77..c3c40c44 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -3059,7 +3059,7 @@ IsActive: true Renderable Component: Mesh: 149697411 - Material: 126974645 + Material: 128805346 IsActive: true RigidBody Component: Type: Dynamic @@ -3089,6 +3089,10 @@ Position Offset: {x: 0, y: 0.300000012, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 + IsActive: true Scripts: - Type: PlayerController Enabled: true @@ -3116,6 +3120,20 @@ throwItem: false rayDistance: 0.75 rayHeight: 0.100000001 + - Type: PlayerAnimations + Enabled: true + playerIdleClip: 227450439 + playerWalkClip: 229125027 + playerRunClip: 228149757 + playerPickUpClip: 219605278 + playerCarryIdleClip: 231128260 + playerCarryWalkClip: 227671720 + playerThrowClip: 223399345 + playerJumpStartClip: 223009573 + playerJumpLoopClip: 230974023 + playerJumpEndClip: 228134756 + silhouettePlayer: 462 + silhouetteBag: 465 - EID: 3 Name: HoldingPoint IsActive: true @@ -3178,7 +3196,11 @@ IsActive: true Renderable Component: Mesh: 144838771 - Material: 123745521 + Material: 117923942 + IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 IsActive: true Scripts: ~ - EID: 462 @@ -3195,6 +3217,10 @@ Mesh: 149697411 Material: 126391182 IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 + IsActive: true Scripts: ~ - EID: 465 Name: SilouetteBag @@ -3210,6 +3236,10 @@ Mesh: 144838771 Material: 126391182 IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 + IsActive: true Scripts: ~ - EID: 239 Name: RespawnPoint diff --git a/Assets/Scenes/Level3.shade b/Assets/Scenes/Level3.shade index 5753c783..b116d292 100644 --- a/Assets/Scenes/Level3.shade +++ b/Assets/Scenes/Level3.shade @@ -11620,7 +11620,7 @@ IsActive: true Renderable Component: Mesh: 149697411 - Material: 126974645 + Material: 128805346 IsActive: true RigidBody Component: Type: Dynamic @@ -11650,6 +11650,10 @@ Position Offset: {x: 0, y: 0.300000012, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 + IsActive: true Scripts: - Type: PlayerController Enabled: true @@ -11677,6 +11681,20 @@ throwItem: false rayDistance: 0.75 rayHeight: 0.100000001 + - Type: PlayerAnimations + Enabled: true + playerIdleClip: 227450439 + playerWalkClip: 229125027 + playerRunClip: 228149757 + playerPickUpClip: 219605278 + playerCarryIdleClip: 231128260 + playerCarryWalkClip: 227671720 + playerThrowClip: 223399345 + playerJumpStartClip: 223009573 + playerJumpLoopClip: 230974023 + playerJumpEndClip: 228134756 + silhouettePlayer: 462 + silhouetteBag: 465 - EID: 66068 Name: HoldingPoint IsActive: true @@ -11739,7 +11757,11 @@ IsActive: true Renderable Component: Mesh: 144838771 - Material: 123745521 + Material: 117923942 + IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 IsActive: true Scripts: ~ - EID: 462 @@ -11756,6 +11778,10 @@ Mesh: 149697411 Material: 126391182 IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 + IsActive: true Scripts: ~ - EID: 465 Name: SilouetteBag @@ -11771,6 +11797,10 @@ Mesh: 144838771 Material: 126391182 IsActive: true + Animator Component: + Rig: 77816045 + AnimationController: 0 + IsActive: true Scripts: ~ - EID: 66065 Name: RespawnPoint diff --git a/Assets/Scripts/Gameplay/Player/PlayerStates/UT_PlayerJumpState.cs b/Assets/Scripts/Gameplay/Player/PlayerStates/UT_PlayerJumpState.cs index 1adfdf67..8d5350d7 100644 --- a/Assets/Scripts/Gameplay/Player/PlayerStates/UT_PlayerJumpState.cs +++ b/Assets/Scripts/Gameplay/Player/PlayerStates/UT_PlayerJumpState.cs @@ -9,7 +9,7 @@ public class PlayerJumpState : BaseState } public override void OnEnter() { - //Debug.Log("WALK ENTER"); + //Debug.Log("jump"); } public override void update() { diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 78b92b84..9bac991b 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -324,6 +324,8 @@ public class PlayerController : Script if ( (Input.GetKeyDown(Input.KeyCode.Space) || landedOnJumpPad ) && isGrounded && rb != null) { currentState = RaccoonStates.JUMP; + if (stateMachine && !stateMachine.IsState(typeof(PlayerJumpState))) + stateMachine.SetState(typeof(PlayerJumpState)); Vector3 v = rb.LinearVelocity; v.y = initialJumpVel * 0.5f; if (holdItem && pat != null && pat.item.GetScript() != null) @@ -346,8 +348,12 @@ public class PlayerController : Script } } - if(!isGrounded && rb != null && (rb.LinearVelocity.y < 0.0f || Input.GetKeyUp(Input.KeyCode.Space))) + if (!isGrounded && rb != null && (rb.LinearVelocity.y < 0.0f || Input.GetKeyUp(Input.KeyCode.Space))) + { currentState = RaccoonStates.FALLING; + if (stateMachine && !stateMachine.IsState(typeof(PlayerFallState))) + stateMachine.SetState(typeof(PlayerFallState)); + } } @@ -378,7 +384,11 @@ public class PlayerController : Script { isGrounded = true; if (currentState == RaccoonStates.FALLING) + { currentState = RaccoonStates.LANDED; + if (stateMachine && !stateMachine.IsState(typeof(PlayerLandState))) + stateMachine.SetState(typeof(PlayerLandState)); + } } else isGrounded = false; -- 2.40.1