2023-03-10 16:26:52 +08:00
|
|
|
|
using SHADE;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class PlayerAnimations : Script
|
|
|
|
|
{
|
|
|
|
|
#region Raccoon
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerIdleClip; // done
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerWalkClip; // done
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerRunClip; // done
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerPickUpClip;
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerCarryIdleClip; // done
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerCarryWalkClip; // done
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerThrowClip;
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerJumpStartClip;
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerJumpLoopClip;
|
|
|
|
|
[SerializeField]
|
|
|
|
|
public AnimationClipAsset playerJumpEndClip;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Animator
|
|
|
|
|
public Animator playerAnimator { get; private set; }
|
|
|
|
|
public Animator BagAnimator { get; private set; }
|
|
|
|
|
public Animator silhoPlayerAnimator { get; private set; }
|
|
|
|
|
public Animator silhoBagAnimator { get; private set; }
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region silhouette
|
|
|
|
|
public GameObject silhouettePlayer;
|
|
|
|
|
public GameObject silhouetteBag;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public static PlayerAnimations Instance { get; private set; }
|
|
|
|
|
|
|
|
|
|
protected override void awake()
|
|
|
|
|
{
|
|
|
|
|
if (Instance != null && Instance != this)
|
|
|
|
|
RemoveScript<PlayerAnimations>();
|
|
|
|
|
else
|
|
|
|
|
Instance = this;
|
|
|
|
|
|
|
|
|
|
playerAnimator = GetComponent<Animator>();
|
|
|
|
|
if (!playerAnimator)
|
|
|
|
|
Debug.LogError("Player Animator is MISSING!");
|
|
|
|
|
|
|
|
|
|
BagAnimator = GetComponentInChildren<Animator>();
|
|
|
|
|
if (!BagAnimator)
|
|
|
|
|
Debug.LogError("Bag Animator is MISSING!");
|
|
|
|
|
|
2023-03-10 19:40:48 +08:00
|
|
|
|
if(silhouettePlayer)
|
2023-03-10 17:25:41 +08:00
|
|
|
|
silhoPlayerAnimator = silhouettePlayer.GetComponent<Animator>();
|
|
|
|
|
else
|
|
|
|
|
Debug.LogError("Silho Player is MISSING!");
|
2023-03-10 19:40:48 +08:00
|
|
|
|
|
2023-03-10 16:26:52 +08:00
|
|
|
|
if (!silhoPlayerAnimator)
|
|
|
|
|
Debug.LogError("Silho Player Animator is MISSING!");
|
|
|
|
|
|
2023-03-10 19:40:48 +08:00
|
|
|
|
if(silhouetteBag)
|
2023-03-10 17:25:41 +08:00
|
|
|
|
silhoBagAnimator = silhouetteBag.GetComponent<Animator>();
|
|
|
|
|
else
|
|
|
|
|
Debug.LogError("Silho bag is MISSING!");
|
2023-03-10 19:40:48 +08:00
|
|
|
|
|
2023-03-10 16:26:52 +08:00
|
|
|
|
if (!silhoBagAnimator)
|
|
|
|
|
Debug.LogError("Silho Player Animator is MISSING!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void onDestroy()
|
|
|
|
|
{
|
|
|
|
|
if (Instance == this)
|
|
|
|
|
Instance = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|