示例#1
0
        protected override void Update(GameTime gameTime)
        {
            if (IsExit())
            {
                Exit();
            }

            foreach (var updateable in updateables)
            {
                updateable.Update(gameTime);
            }

            if (keyboardHelper.GetNewPressed().Any() || mouseHelper.GetNewPressed() != 0)
            {
                shapes.Add(shapeFactory.Random(ScreenSize));
            }

            if (Keyboard.GetState().IsKeyDown(Keys.Z) && Keyboard.GetState().IsKeyDown(Keys.F1))
            {
                ClearShapes();
            }

            base.Update(gameTime);
        }