changes in male and female animations
This commit is contained in:
@@ -14,13 +14,18 @@ public abstract class BaseCharacter : MonoBehaviour
|
||||
private readonly Queue<PlayerTasks> _tasks = new Queue<PlayerTasks>();
|
||||
private PlayerTasks _currentTask;
|
||||
|
||||
private CharacterDescriptor _characterDescriptor;
|
||||
private Action _OnAnimationFinish;
|
||||
private AnimationStates _currentAnimation;
|
||||
|
||||
private CharacterSex _characterSex;
|
||||
|
||||
protected void IntCharacter()
|
||||
{
|
||||
_animator=GetComponentInChildren<Animator>();
|
||||
|
||||
_animator = GetComponentInChildren<Animator>();
|
||||
_characterDescriptor = GetComponentInChildren<CharacterDescriptor>();
|
||||
_characterSex = _characterDescriptor.Sex;
|
||||
SetPlayerAnimation(AnimationStates.Idle);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@@ -133,7 +138,9 @@ public abstract class BaseCharacter : MonoBehaviour
|
||||
{
|
||||
return;
|
||||
}
|
||||
_animator.Play(PlayerHelper.GetEnumMemberValue(newState));
|
||||
var stringStatte=PlayerHelper.GetEnumMemberValue(newState);
|
||||
stringStatte= string.Format(stringStatte,_characterSex.ToString());
|
||||
_animator.Play(stringStatte);
|
||||
_currentAnimation = newState;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
public class RootMotion : MonoBehaviour
|
||||
public class CharacterDescriptor : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
public CharacterSex Sex;
|
||||
private NavMeshAgent _navMeshAgent;
|
||||
|
||||
private void Start()
|
||||
Reference in New Issue
Block a user