// Use this for initialization void Start() { _anima = GetComponent <Animator> (); _rigidbody = GetComponent <Rigidbody2D> (); _audioManager = GetComponent <AudioManager> (); _manager = GetComponent <FallenManager> (); _fsm = new MyFSM(Moves); _fsm.AddStates((int)FallenState.Moves, Moves); _fsm.AddStates((int)FallenState.Attack, DoAttack); _fsm.AddStates((int)FallenState.Teleport, DoTeleport); }
void Start() { _motor = GetComponent <FallenMotor>(); _manager = GetComponent <FallenManager>(); _lastAttackTime = Time.fixedTime; }