Minor bug fixes and raccoon animation base #422

Merged
glencelow merged 3 commits from PlayerController into main 2023-03-10 20:07:48 +08:00
6 changed files with 56 additions and 19 deletions
Showing only changes of commit dc0d947dfb - Show all commits

View File

@ -7668,8 +7668,8 @@
playerJumpStartClip: 223009573
playerJumpLoopClip: 230974023
playerJumpEndClip: 228134756
silhouettePlayer: 51000
silhouetteBag: 51000
silhouettePlayer: 462
silhouetteBag: 465
- EID: 65733
Name: HoldingPoint
IsActive: true
@ -7753,6 +7753,10 @@
Mesh: 149697411
Material: 126391182
IsActive: true
Animator Component:
Rig: 77816045
AnimationController: 0
IsActive: true
Scripts: ~
- EID: 465
Name: SilouetteBag
@ -7768,6 +7772,10 @@
Mesh: 144838771
Material: 126391182
IsActive: true
Animator Component:
Rig: 77816045
AnimationController: 0
IsActive: true
Scripts: ~
- EID: 65732
Name: RespawnPoint

View File

@ -16,13 +16,23 @@ public class PlayerIdleState : BaseState
{
if (!holdItem)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
if (PlayerAnimations.Instance.playerIdleClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
}
}
else
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
if (PlayerAnimations.Instance.playerCarryIdleClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
}
}
}

View File

@ -14,10 +14,12 @@ public class PlayerRunState : BaseState
public override void OnEnter()
{
//Debug.Log("WALK ENTER");
if (PlayerAnimations.Instance)
if (PlayerAnimations.Instance && PlayerAnimations.Instance.playerRunClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerRunClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerRunClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerRunClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerRunClip);
}
}
public override void update()

View File

@ -20,17 +20,23 @@ public class PlayerWalkState : BaseState
{
if (!holdItem)
{
if(PlayerAnimations.Instance.playerWalkClip)
if (PlayerAnimations.Instance.playerWalkClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
if(PlayerAnimations.Instance.playerWalkClip)
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
}
}
else
{
if(PlayerAnimations.Instance.playerCarryWalkClip)
if (PlayerAnimations.Instance.playerCarryWalkClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
if(PlayerAnimations.Instance.playerCarryWalkClip)
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
}
}
}
}

View File

@ -57,17 +57,19 @@ public class PlayerAnimations : Script
if (!BagAnimator)
Debug.LogError("Bag Animator is MISSING!");
if(!silhouettePlayer)
if(silhouettePlayer)
silhoPlayerAnimator = silhouettePlayer.GetComponent<Animator>();
else
Debug.LogError("Silho Player is MISSING!");
if (!silhoPlayerAnimator)
Debug.LogError("Silho Player Animator is MISSING!");
if(!silhouetteBag)
if(silhouetteBag)
silhoBagAnimator = silhouetteBag.GetComponent<Animator>();
else
Debug.LogError("Silho bag is MISSING!");
if (!silhoBagAnimator)
Debug.LogError("Silho Player Animator is MISSING!");
}

View File

@ -26,24 +26,33 @@ project "SHADE_CSharp"
}
warnings 'Extra'
postbuildcommands
{
"xcopy /r /y /q \"%{outputdir}\\net5.0\\SHADE_CSharp.xml\" \"%{outputdir}\"",
"xcopy /r /y /q \"%{outputdir}\\net5.0\\SHADE_CSharp.pdb\" \"%{outputdir}\""
}
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"