fixed animation
This commit is contained in:
@@ -7,9 +7,9 @@ public abstract class Character : MonoBehaviour
|
||||
[SerializeField]
|
||||
private float MovementSpeed = 1.5f;
|
||||
[SerializeField]
|
||||
private GameObject _vikingSide;
|
||||
protected GameObject _bonesSide;
|
||||
[SerializeField]
|
||||
private GameObject _vikingBack;
|
||||
protected GameObject _bonesBack;
|
||||
|
||||
[SerializeField]
|
||||
private LayerMask _mapLayer;
|
||||
|
||||
@@ -2,6 +2,10 @@ using UnityEngine;
|
||||
|
||||
public class EnemyAI : Character
|
||||
{
|
||||
protected override void SetClimbingAnimation(bool isClimbing)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void SetWalkingAnimation(bool isWalking)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -90,12 +90,19 @@ public class Player : Character
|
||||
|
||||
protected override void SetWalkingAnimation(bool isWalking)
|
||||
{
|
||||
_bonesBack.SetActive(false);
|
||||
_bonesSide.SetActive(true);
|
||||
_animator.SetBool("Legs_Walk",isWalking);
|
||||
_animator.SetBool("Body_Walk", isWalking);
|
||||
}
|
||||
|
||||
protected override void SetClimbingAnimation(bool isClimbing)
|
||||
{
|
||||
if (isClimbing)
|
||||
{
|
||||
_bonesBack.SetActive(true);
|
||||
_bonesSide.SetActive(false);
|
||||
}
|
||||
_animator.SetBool("Climb", isClimbing);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user