Exemplo n.º 1
0
 public void OnCommandStateChanged(InputCommandState cmdState)
 {
     if (OnButtonCommand != null)
     {
         OnButtonCommand(cmdState);
     }
 }
Exemplo n.º 2
0
    void ButtonCommandHandler(InputCommandState inCmdState)
    {
        //Debug.Log(inCmdState.InputCommand.ToString() + " " + inCmdState.CurrentState.ToString() + " " + inCmdState.HoldTime.ToString());
        switch (inCmdState.InputCommand)
        {
        case EInputCommand.None:
            break;

        case EInputCommand.Attack:
            break;

        case EInputCommand.Dodge:
            break;

        case EInputCommand.LiftUp:
            if (IsGrounded)
            {
                _doGlide = false;
                if (inCmdState.CurrentState == EInputState.Press)
                {
                    _isJumping = true;
                    _animState = _armatureComponent.animation.FadeIn("jump_1");
                }
            }
            else
            {
                _doGlide = (inCmdState.CurrentState != EInputState.Release);
            }
            break;

        case EInputCommand.Skill:
            break;

        case EInputCommand.Item:
            break;

        case EInputCommand.Burst:
            break;

        default:
            break;
        }
    }