void SubmitSolutionAndReload(TimeSpan time) { greenCount = 0; originalGreenCount = 0; currentX = 0; currentY = 0; nextFootPrint = 3; testGrid.Delete(); currentMoveList.Clear(); GetLevel(solutionURL); solved = false; linesMade = false; currentStartX = 0; currentStartY = 0; Reset(); moveManager = new MortalCoilMoveList(system, sizeY); beginTime = gameTime.TotalTime; }
/*//////////////////////////////////////////////////////// Methods ////////////////////////////////////////////////////////*/ public override void Initialize() { base.Initialize(); /*///////////////////////////////// Settings /////////////////////////////////*/ #region initsettings graphics.Settings.Display.VSyncEnabled.ClientValue = false; graphics.Settings.Projection.ProjectionType.ClientValue = projectionType; graphics.Settings.Projection.OrthographicBoundary.ClientValue = new FACE_System.Rectangle(0f, 8f, 0f, 6f); graphics.Settings.Projection.OrthographicBoundary.UpdateRateHolding.ClientValue = 0.5f; System.Window.Title = "Client"; System.Graphics.Settings.ScreenArea.WindowSize.ClientVector2D = new Vector2(800f, 600f); double g = graphics.Settings.Projection.ZNear.ClientValue = 1.0; double f = graphics.Settings.Projection.ZFar.ClientValue = 19.001; GL.Enable(EnableCap.DepthTest); GL.DepthFunc(DepthFunction.Less); GL.CullFace(CullFaceMode.FrontAndBack); GL.Hint(HintTarget.FogHint, HintMode.Fastest); GL.Hint(HintTarget.GenerateMipmapHint, HintMode.Fastest); GL.Hint(HintTarget.LineSmoothHint, HintMode.Fastest); GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Fastest); GL.Hint(HintTarget.PointSmoothHint, HintMode.Fastest); GL.Hint(HintTarget.PolygonSmoothHint, HintMode.Fastest); GL.Hint(HintTarget.TextureCompressionHint, HintMode.Fastest); #endregion /*///////////////////////////////// Buttons /////////////////////////////////*/ #region initbuttons ButtonMapping bMap = System.Input.Settings.ButtonMapSettings.CurrentButtonMap; //Zoom/Pan bMap.AddHotkey(CommonKeyboardKeys.NUMPAD_ADD, FACESystemFunctions.Projection_Ortho_ZoomIn, ButtonMapType.Holding); bMap.AddHotkey(CommonKeyboardKeys.NUMPAD_SUBTRACT, FACESystemFunctions.Projection_Ortho_ZoomOut, ButtonMapType.Holding); bMap.AddHotkey(CommonKeyboardKeys.NUMPAD8, FACESystemFunctions.Projection_Ortho_MoveUp, ButtonMapType.Holding); bMap.AddHotkey(CommonKeyboardKeys.NUMPAD2, FACESystemFunctions.Projection_Ortho_MoveDown, ButtonMapType.Holding); bMap.AddHotkey(CommonKeyboardKeys.NUMPAD4, FACESystemFunctions.Projection_Ortho_MoveLeft, ButtonMapType.Holding); bMap.AddHotkey(CommonKeyboardKeys.NUMPAD6, FACESystemFunctions.Projection_Ortho_MoveRight, ButtonMapType.Holding); bMap.AddHotkey(CommonKeyboardKeys.T, new TimeDependentFunction(SubmitSolutionAndReload), ButtonMapType.JustPressed); bMap.AddHotkey(CommonKeyboardKeys.D, new TimeDependentFunction(ToggleBoardDrawing), ButtonMapType.JustPressed); #endregion /*///////////////////////////////// Data /////////////////////////////////*/ #region initdata greenBox = new Texture2D(@"../../Content/greensquare.bmp"); greyBox = new Texture2D(@"../../Content/greysquare.bmp"); currentStartSprite = new Sprite(system, greenBox); currentStartSprite.Scale = new Vector3(.5f, .5f, 1f); if(levelToGet == -1) GetLevel(@"http://www.hacker.org/coil/index.php?name=Allosentient&password=XXXXX"); else GetLevel(levelToGet); currentMoveList = new MortalCoilMove(new Location(currentStartX, currentStartY)); moveManager = new MortalCoilMoveList(system, sizeY); #endregion }