コード例 #1
0
    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;
    }
コード例 #2
0
    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;
    }