changes in male and female animations

This commit is contained in:
2024-04-28 17:24:21 +03:00
parent 4d3935236f
commit 3116437c46
22 changed files with 18931 additions and 174 deletions
+10 -3
View File
@@ -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()