void Start()
    {
        personCtrl        = this.GetComponent <HeroCtrl>();
        heroStateActVer   = new IdleStateActVer(this.gameObject);
        heroStateMoveVer  = new IdleStateMoveVer(this.gameObject);
        inputArgs         = new InputEventArgs("", "", "");
        hero_act_state[0] = new IdleStateActVer(this.gameObject);
        hero_act_state[1] = new ActState(this.gameObject);
        hero_act_state[2] = new DefenseState(this.gameObject);

        hero_move_state[0] = new IdleStateMoveVer(this.gameObject);
        hero_move_state[1] = new MoveState(this.gameObject);
        hero_move_state[2] = new JumpState(this.gameObject);

        InputTran += new InputEventHandler(heroStateActVer.handleInput);
        InputTran += new InputEventHandler(heroStateMoveVer.handleInput);
    }
Beispiel #2
0
    void Start()
    {
        personCtrl = this.GetComponent<HeroCtrl>();
        heroStateActVer = new IdleStateActVer(this.gameObject);
        heroStateMoveVer = new IdleStateMoveVer(this.gameObject);
        inputArgs = new InputEventArgs("", "", "");
        hero_act_state[0] = new IdleStateActVer(this.gameObject);
        hero_act_state[1] = new ActState(this.gameObject);
        hero_act_state[2] = new DefenseState(this.gameObject);

        hero_move_state[0] = new IdleStateMoveVer(this.gameObject);
        hero_move_state[1] = new MoveState(this.gameObject);
        hero_move_state[2] = new JumpState(this.gameObject);

        InputTran += new InputEventHandler(heroStateActVer.handleInput);
        InputTran += new InputEventHandler(heroStateMoveVer.handleInput);
    }