protected void OnInputEvent(object sender, BattleInputEventArgs e) { if (_stateManager.GetCurrentState() == eAnimationStateName.Hurt) { return; } SetForward(new Vector2(e.X_MoveDir, 0)); _stateManager.OnInputEvent(e.InputType); }
void CreateEvent(eInputType type) { BattleInputEventArgs args = new BattleInputEventArgs(); args.X_MoveDir = _xDir; switch (type) { default: args.InputType = type; break; } BattleManager._Instance.InputManager.AddInputEvent(args); }
protected virtual void OnInputEvent(BattleInputEventArgs e) { EventHandler <BattleInputEventArgs> handler = InputEvent; handler?.Invoke(this, e); }
public void AddInputEvent(BattleInputEventArgs e) { OnInputEvent(e); }