예제 #1
0
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            if (this.IsActive)
            {
                swarmInXOrder = populationSimulator.GetSwarmInXOrder();

                foreach (var group in groups)
                {
                    //debugComponent.AddDebugItem(group.Key.ToString(), group.Key + "  " + group.Value);
                }

                analysisComponent.Update(swarmInXOrder, ScreenManager.GraphicsDevice.Viewport.Bounds, gameTime);
                Border.Update(swarmInXOrder);
                emitterComponent.UpdateInput(supers, groups);

                if (StaticEditModeParameters.IsEraseMode() ||
                    StaticEditModeParameters.IsBrushMode())
                {
                    populationSimulator.stepSimulation(supers.Values.ToList <Individual>(), 0);
                }
                else
                {
                    populationSimulator.stepSimulation(supers.Values.ToList <Individual>(), 20);
                }

                Camera.Update(gameTime);
            }
            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
        }