Update() public method

public Update ( ) : void
return void
コード例 #1
0
        private void Update()
        {
            GLUI.fontSize = defaultFontSize;
#if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                return;
            }
#endif
            Events.Update();
            EarlyUpdate();
            UpdateInput();
        }
コード例 #2
0
        public void Update()
        {
            if (m_Active)
            {
                m_Runtime += Time.deltaTime;
            }
            else
            {
                m_Runtime = 0;
            }

            Effect.Update();
            Events.Update();
        }
コード例 #3
0
ファイル: Game1.cs プロジェクト: AlvinJangvik/AlvinArvSpel
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            if (health.Health < 1)
            {
                game = 0;
            }

            fps++;
            controll.Update(ref show_fps, ref game);

            if (game == 1)
            {
                internet.Update();
                if (Internet.Active == false)
                {
                    Turns.Update();
                    if (Events.Status == 1)
                    {
                        enemy.Update();
                    }
                    events.Update();
                    laser.Update();
                    player.Update();
                }
            }


            stars.Update();

            test = gameTime.TotalGameTime.TotalSeconds;
            if (test >= temp)
            {
                fpsS = fps;  test--; temp++; fps = 0;
            }

            base.Update(gameTime);
        }
コード例 #4
0
    public virtual void Update(float deltaTime)
    {
        Events.Update(deltaTime);
        Entities.Update(deltaTime);

        var popularity = TaxController.Popularity + FoodController.Popularity;

        _popularityInternal += popularity * Time.deltaTime;
        _popularityInternal  = _popularityInternal.Clamped(_worldInfo.MinPopularity, _worldInfo.MaxPopularity);

        if (_updateTimer.FloorToInt() != (_updateTimer + deltaTime).FloorToInt())
        {
            Gold += TaxController.Amount * Population;
            Stockpile.ChangeTotalResourceTypeAmount(ResourceType.Food, FoodController.Amount * Population);
        }

        _updateTimer += deltaTime;

        UpdatePopulation();
    }
コード例 #5
0
 public void UpdateEvent()
 {
     Events.Update(SelectedIndex, SelectedEvent);
     Save();
 }