Пример #1
0
        public void CheckPlayerInput(Person playerChar)
        {
            if (IsHeld(Keys.LeftControl) && IsHeld(Keys.W))
                ExitGame = true;

            if (LeftMouseJustPressed())
            {
                playerChar.justIssuedNewMovement = true;
            }

            playerChar.MouseIsAt = MouseLocation();
        }
Пример #2
0
        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);
        }
Пример #3
0
 private void turnGoodZPersonChar(Person thePerson)
 {
     _texture = "Graphics\\GreenBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
Пример #4
0
 private void turnEvilZPersonChar(Person thePerson)
 {
     _texture = "Graphics\\PurpleBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
Пример #5
0
 private void resurrectPersonChar(Person thePerson)
 {
     _texture = "Graphics\\WhiteBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
Пример #6
0
 private void killPersonChar(Person thePerson)
 {
     _texture = "Graphics\\RedBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
Пример #7
0
 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";
     }
 }
Пример #8
0
 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;
     }
 }