Beispiel #1
0
    protected void OnInputEvent(object sender, BattleInputEventArgs e)
    {
        if (_stateManager.GetCurrentState() == eAnimationStateName.Hurt)
        {
            return;
        }

        SetForward(new Vector2(e.X_MoveDir, 0));
        _stateManager.OnInputEvent(e.InputType);
    }
Beispiel #2
0
    void CreateEvent(eInputType type)
    {
        BattleInputEventArgs args = new BattleInputEventArgs();

        args.X_MoveDir = _xDir;
        switch (type)
        {
        default:
            args.InputType = type;
            break;
        }


        BattleManager._Instance.InputManager.AddInputEvent(args);
    }
Beispiel #3
0
    protected virtual void OnInputEvent(BattleInputEventArgs e)
    {
        EventHandler <BattleInputEventArgs> handler = InputEvent;

        handler?.Invoke(this, e);
    }
Beispiel #4
0
 public void AddInputEvent(BattleInputEventArgs e)
 {
     OnInputEvent(e);
 }