Esempio n. 1
0
        /// <summary>
        /// Handler for the controller's OnUpdate event. Invalidates itself so drawingPanel redraws
        /// </summary>
        private void OnFrame()
        {
            // Invalidate this form and all its children
            // This will cause the form to redraw as soon as it can
            try
            {
                MethodInvoker invalidator = new MethodInvoker(() => this.Invalidate(true));
                this.Invoke(invalidator);
            }
            catch { }

            //If world is set and walls are loaded, call Send
            if (world != null && world.WallsLoaded)
            {
                controller.Send();
            }
        }