Update() private méthode

private Update ( ) : void
Résultat void
Exemple #1
0
        public override void Update(GameTime gameTime)
        {
            gameMaster.Update(gameTime, player, map);
            UpdateSessionData();
            if (!gameMaster.isActive)
            {
                foreach (Sprite sprite in _sprites)
                {
                    sprite.Update(gameTime, player, map, movableItems);
                }

                map.Update(gameTime);
                _camera.Follow(ghostSprite, !isLightShader);
                foreach (var paralax in _paralaxes)
                {
                    paralax.Update(ghostSprite, graphics);
                }

                foreach (Item item in _items)
                {
                    item.Update(gameTime, player, map);
                }

                foreach (MovableItem item in movableItems)
                {
                    item.Update(gameTime, player, map, movableItems);
                }


                List <FallableObject> newFallableList = new List <FallableObject>();
                foreach (FallableObject item in fallableObjects)
                {
                    item.Update(gameTime, player, map);
                    if (!item.isOnGround)
                    {
                        newFallableList.Add(item);
                    }
                }
                fallableObjects = newFallableList;


                foreach (CheckPoint checkPoint in _checkpoints)
                {
                    if ((checkPoint.isChecked) & (!checkPoint.wasChecked))
                    {
                        spawnPoint = new Vector2(checkPoint.rectangle.X, checkPoint.rectangle.Y - 50);
                    }
                }
                foreach (Spring tmp in springs)
                {
                    tmp.Update(gameTime, player, map);
                }


                gameUI.Update(gameTime);
                CheckEndLevel();
            }
        }
Exemple #2
0
 public void Update()
 {
     GameNet.Main.MainUpdate();
     GameNet.GameBattle.BattleUpdate();
     GameUI.Update();
     mCurrentState.Update();
     GameBase.UpdateAll();
     AudioManager.Instance.UpdateSoundSource();
 }
Exemple #3
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                this.Exit();
            }

            HandledEvent();
            // TODO: Add your update logic here
            MouseEvent.Instance.Update();
            KeyboardEvent.Instance.Update();
            gameUI.Update(gameTime);

            base.Update(gameTime);
        }
Exemple #4
0
 public override void Update(GameTime gameTime)
 {
     UI.Update(gameTime);
     Input.Update(gameTime);
     UI.PostUpdate(gameTime);
 }