World.ToyWorldCore.AutoupdateRegister.UpdateItems C# (CSharp) Method

UpdateItems() public method

public UpdateItems ( IAtlas atlas, TilesetTable table ) : void
atlas IAtlas
table World.GameActors.Tiles.TilesetTable
return void
        public void UpdateItems(IAtlas atlas, TilesetTable table)
        {
            if (atlas.NewAutoupdateables != null)
            {
                CurrentUpdateRequests.AddRange(atlas.NewAutoupdateables);
                atlas.NewAutoupdateables.Clear();
            }
            foreach (IAutoupdateableGameActor actor in CurrentUpdateRequests)
            {
                actor.Update(atlas, table);
                if (actor.NextUpdateAfter > 0)
                    Register(actor, actor.NextUpdateAfter);
            }
            CurrentUpdateRequests.Clear();
        }

Usage Example

Example #1
0
        //
        // TODO: methods below will be moved to some physics class
        //


        #region Updating

        public void Update()
        {
            UpdateTime();
            UpdateScheduled();
            UpdateLayers();
            UpdateAvatars();
            UpdateCharacters();
            AutoupdateRegister.UpdateItems(Atlas, TilesetTable);
            UpdatePhysics();
            UpdateAtmosphere();
            //Log.Instance.Debug("World.ToyWorldCore.ToyWorld: ===================Step performed======================");
        }
All Usage Examples Of World.ToyWorldCore.AutoupdateRegister::UpdateItems