Example #1
0
        public Player()
        {
            ID = currentID;
            currentID++;

            keyboard     = new PlayerKeyboard();
            controlables = new List <Controlable>();
        }
Example #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();
                }
            }
Example #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;
            }
        }
Example #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;
        }
Example #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;
            }
        }
Example #6
0
        public Player()
        {
            ID = currentID;
            currentID++;

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