コード例 #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
ファイル: VooDoo.cs プロジェクト: dotJack/MyLittleVoodooGod
        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
ファイル: Person.cs プロジェクト: dotJack/MyLittleVoodooGod
 private void turnGoodZPersonChar(Person thePerson)
 {
     _texture = "Graphics\\GreenBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
コード例 #4
0
ファイル: Person.cs プロジェクト: dotJack/MyLittleVoodooGod
 private void turnEvilZPersonChar(Person thePerson)
 {
     _texture = "Graphics\\PurpleBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
コード例 #5
0
ファイル: Person.cs プロジェクト: dotJack/MyLittleVoodooGod
 private void resurrectPersonChar(Person thePerson)
 {
     _texture = "Graphics\\WhiteBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
コード例 #6
0
ファイル: Person.cs プロジェクト: dotJack/MyLittleVoodooGod
 private void killPersonChar(Person thePerson)
 {
     _texture = "Graphics\\RedBall";
     this._skin = this.Game.Content.Load<Texture2D>(_texture);
 }
コード例 #7
0
ファイル: Person.cs プロジェクト: dotJack/MyLittleVoodooGod
 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
ファイル: Person.cs プロジェクト: dotJack/MyLittleVoodooGod
 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;
     }
 }