public void CheckPlayerInput(Person playerChar) { if (IsHeld(Keys.LeftControl) && IsHeld(Keys.W)) ExitGame = true; if (LeftMouseJustPressed()) { playerChar.justIssuedNewMovement = true; } playerChar.MouseIsAt = MouseLocation(); }
public VooDoo() { _graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; DisplayMode displayMode = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode; this._graphics.PreferredBackBufferFormat = displayMode.Format; this._graphics.PreferredBackBufferWidth = (int)(displayMode.Width / 1.1); this._graphics.PreferredBackBufferHeight = (int)(displayMode.Height / 1.5); _playerOne = new Person(this, Person.TypeOfPerson.player, 1, 1, new Vector2(50,50), Vector2.Zero); this.Components.Add(_playerOne); }
private void turnGoodZPersonChar(Person thePerson) { _texture = "Graphics\\GreenBall"; this._skin = this.Game.Content.Load<Texture2D>(_texture); }
private void turnEvilZPersonChar(Person thePerson) { _texture = "Graphics\\PurpleBall"; this._skin = this.Game.Content.Load<Texture2D>(_texture); }
private void resurrectPersonChar(Person thePerson) { _texture = "Graphics\\WhiteBall"; this._skin = this.Game.Content.Load<Texture2D>(_texture); }
private void killPersonChar(Person thePerson) { _texture = "Graphics\\RedBall"; this._skin = this.Game.Content.Load<Texture2D>(_texture); }
private String initiateSkin(Person thePerson) { if (thePerson._type == TypeOfPerson.player) { return (String)"Graphics\\WhiteBall"; } else if (thePerson._type == TypeOfPerson.goodZombie) { return (String)"Graphics\\PurpleBall"; } else { return (String)"Graphics\\GreenBall"; } }
private float initiateBaseSpeed(Person thePerson) { if (thePerson._type == TypeOfPerson.player) { return 0.9f; } else if (thePerson._type == TypeOfPerson.goodZombie) { return 0.5f; } else { return 0.3f; } }