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

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

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