Example #1
0
    // Use this for initialization
    void Start()
    {
        _button_Left   = new MoveLeftCommand(_player_Object);
        _button_Right  = new MoveRightCommand(_player_Object);
        _button_Empty  = new IdleCommand(_player_Object);
        _button_Z      = new PunchAttackCommand(_player_Object);
        _button_X      = new KickAttackCommand(_player_Object);
        _button_Space  = new JumpCommand(_player_Object);
        _player_Action = new PlayerController(_player_Object);

        _button_A = new MacroCommand(_player_Object);
        _button_A.addCommand(_button_X);
        _button_A.addCommand(_button_Z);
        _button_A.addCommand(_button_X);


        _button_S = new MacroCommand(_player_Object);
        _button_S.addCommand(_button_Space);
        _button_S.addCommand(_button_Z);
    }