private void Start() { _walk = new Walk(); _jump = new Jump(); _kick = new Kick(); _punch = new Punch(); _animator = player.GetComponent <Animator>(); }
public void LoadAnimatorData() { commandHistory.Clear(); string[] Lines = System.IO.File.ReadAllLines(ReplaySystem.RecordDataPath + $"/{name}_Animator.json"); foreach (string str in Lines) { IReplayCommand c = new AnimatorCommand(animator); c.LoadData(str); commandHistory.Add(c); } }
// Start is called before the first frame update void Start() { run = new Run(); walk = new Walk(); walkBack = new WalkBack(); jumpBack = new JumpBack(); jump = new Jump(); idle = new Idle(); die = new Die(); characterController = GetComponent <CharacterController>(); animator = GetComponent <Animator>(); PlayerStates.Singleton.IsJumping = false; }
public void LoadData(string AnimatorCommandData) { animatorCommand = JsonUtility.FromJson <AnimatorCommand>(AnimatorCommandData); AnimatorDatas = animatorCommand.AnimatorDatas; }