Esempio n. 1
0
        public override void InputHeld(object sender, InputData data)
        {
            switch (data.Input)
            {
                case GameInputs.Jump:

                    if (VertState == VertState.Air)
                    {
                        if (_jumpVelLeft > 0.0f)
                        {
                            Vel.Y -= 1.0f;
                            _jumpVelLeft -= 1.0f;
                        }
                    }

                    break;
                case GameInputs.Left:

                    if (State == State.Idle)
                    {
                        SetState(State.Walk, VertState.Ground);
                    }

                    Flip = true;
                    Vel.X -= _moveAcc;

                    break;
                case GameInputs.Right:

                    if (State == State.Idle)
                    {
                        SetState(State.Walk, VertState.Ground);
                    }

                    Flip = false;
                    Vel.X += _moveAcc;

                    break;
            }
        }
Esempio n. 2
0
 public override void InputReleased(object sender, InputData data)
 {
 }
Esempio n. 3
0
        public override void InputPressed(object sender, InputData data)
        {
            switch (data.Input)
            {
                case GameInputs.Jump:

                    if (VertState == VertState.Ground)
                    {
                        Vel.Y -= _jumpVelStart;
                        _jumpVelLeft = _jumpVelMax - _jumpVelStart;
                        SetState(State.Jump, VertState.Air);
                    }

                    break;
            }
        }
Esempio n. 4
0
 public void InputReleased(object sender, InputData data)
 {
 }
Esempio n. 5
0
 public void InputPressed(object sender, InputData data)
 {
 }
Esempio n. 6
0
 public void InputHeld(object sender, InputData data)
 {
 }
Esempio n. 7
0
        public virtual void InputPressed(object sender, InputData data)
        {
            switch (data.Input)
            {
                case GameInputs.Debug1:

                    GlobalLight = !GlobalLight;

                    break;
                case GameInputs.Debug2:

                    break;
                case GameInputs.Debug3:

                    break;
            }
        }