Ejemplo n.º 1
0
        public virtual void Update(float deltaTime)
        {
            if (TimeScale != 1f)
            {
                if (timeScaleCooldown > 0)
                {
                    timeScaleCooldown -= deltaTime;
                }
                else
                {
                    TimeScale = Util.Approach(TimeScale, 1, 0.1f);
                }
                deltaTime = deltaTime * TimeScale;
            }

            foreach (Entity entity in Entities)
            {
                entity.Update(deltaTime);
            }

            Entities.Update();
            CollisionManager.Update();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// A scene that manages entities, input and collisions
 /// </summary>
 public Scene()
 {
     CollisionManager = new CollisionManager();
     InputManager     = new InputManager();
     Initialize();
 }