SHADE_Y3/Assets/Scripts/Gameplay/Player/SC_PlayerAnimations.cs

76 lines
2.0 KiB
C#

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!");
silhoPlayerAnimator = silhouettePlayer.GetComponent<Animator>();
if (!silhoPlayerAnimator)
Debug.LogError("Silho Player Animator is MISSING!");
silhoBagAnimator = silhouetteBag.GetComponent<Animator>();
if (!silhoBagAnimator)
Debug.LogError("Silho Player Animator is MISSING!");
}
protected override void onDestroy()
{
if (Instance == this)
Instance = null;
}
}