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