void Awake() { stateAttack = new BabyDragonStateAttack(); stateDie = new BabyDragonStateDie(); stateIdle = new BabyDragonStateIdle(); stateMove = new BabyDragonStateMove(); FSM = new FiniteStateMachine <BabyDragonController>(); babyAnimation = this.transform.GetChild(0).GetComponent <BabyDragonAnimation>(); babyAttack = this.GetComponentInChildren <BabyDragonAttack>(); StateAction = EDragonStateAction.IDLE; StateDirection = EDragonStateDirection.LEFT; attribute.HP.Current = attribute.HP.Max; }
void Awake() { stateAttack = new BabyDragonStateAttack(); stateDie = new BabyDragonStateDie(); stateIdle = new BabyDragonStateIdle(); stateMove = new BabyDragonStateMove(); FSM = new FiniteStateMachine<BabyDragonController>(); babyAnimation = this.transform.GetChild(0).GetComponent<BabyDragonAnimation>(); babyAttack = this.GetComponentInChildren<BabyDragonAttack>(); StateAction = EDragonStateAction.IDLE; StateDirection = EDragonStateDirection.LEFT; attribute.HP.Current = attribute.HP.Max; }