Ejemplo n.º 1
0
        public Player()
        {
            ID = currentID;
            currentID++;

            keyboard     = new PlayerKeyboard();
            controlables = new List <Controlable>();
        }
Ejemplo n.º 2
0
            public void Interact(PlayerKeyboard actionKeyboard)
            {
                if (actionKeyboard.keyboard[ActionKeyType.Up].JustPressed)
                {
                    selectedEntry++;
                }

                if (actionKeyboard.keyboard[ActionKeyType.Down].JustPressed)
                {
                    selectedEntry--;
                }

                if (actionKeyboard.keyboard[ActionKeyType.Space].JustPressed)
                {
                    SelectCurrentEntry();
                }
            }
Ejemplo n.º 3
0
        public void Interact(PlayerKeyboard actionKeyboard)
        {
            if (actionKeyboard.keyboard[ActionKeyType.Left].keyState == ActionKey.KeyState.Pressed)
            {
                position.X -= 5f;
            }

            if (actionKeyboard.keyboard[ActionKeyType.Right].keyState == ActionKey.KeyState.Pressed)
            {
                position.X += 5f;
            }

            if ((actionKeyboard.keyboard[ActionKeyType.Up].Pressed) && inFloor)
            {
                velocity.Y -= 40f;
            }
        }
Ejemplo n.º 4
0
        public void Interact(PlayerKeyboard actionKeyboard)
        {
            if (actionKeyboard.keyboard[ActionKeyType.Up].Pressed)
                movingForward = true;
            else
                movingForward = false;

            if (actionKeyboard.keyboard[ActionKeyType.Down].Pressed)
                movingBackward = true;
            else
                movingBackward = false;

            if (actionKeyboard.keyboard[ActionKeyType.Right].Pressed)
                rotateRight = true;
            else
                rotateRight = false;

            if (actionKeyboard.keyboard[ActionKeyType.Left].Pressed)
                rotateLeft = true;
            else
                rotateLeft = false;
        }
Ejemplo n.º 5
0
        public void Interact(PlayerKeyboard actionKeyboard)
        {
            if (actionKeyboard.keyboard[ActionKeyType.Up].Pressed)
            {
                movingForward = true;
            }
            else
            {
                movingForward = false;
            }

            if (actionKeyboard.keyboard[ActionKeyType.Down].Pressed)
            {
                movingBackward = true;
            }
            else
            {
                movingBackward = false;
            }

            if (actionKeyboard.keyboard[ActionKeyType.Right].Pressed)
            {
                rotateRight = true;
            }
            else
            {
                rotateRight = false;
            }

            if (actionKeyboard.keyboard[ActionKeyType.Left].Pressed)
            {
                rotateLeft = true;
            }
            else
            {
                rotateLeft = false;
            }
        }
Ejemplo n.º 6
0
        public Player()
        {
            ID = currentID;
            currentID++;

            keyboard = new PlayerKeyboard();
            controlables = new List<Controlable>();
        }