void OnToolChanged(ToolType toolType) { if (toolType == ToolType.PencilPaintTool) { Cursor.SetCursorType(CursorType.PencilActionCursor); } else if (toolType == ToolType.BrushPaintTool) { Cursor.SetCursorType(CursorType.BrushActionCursor); } else if (toolType == ToolType.EraserTool) { Cursor.SetCursorType(CursorType.EraserActionCursor); } else if (toolType == ToolType.BrushPaintTool) { Cursor.SetCursorType(CursorType.BrushActionCursor); } else if (toolType == ToolType.MagicNewTool) { Cursor.SetCursorType(CursorType.MagicNewCursor); } else if (toolType == ToolType.MagicAddTool) { Cursor.SetCursorType(CursorType.MagicAddCursor); } else if (toolType == ToolType.MagicSubTool) { Cursor.SetCursorType(CursorType.MagicSubCursor); } else if (toolType == ToolType.TransTool) { Cursor.HideCursor(); drawing.ApplySelection(); SelectionTouch.Active = true; CursorTouch.Active = false; } if (CurrentTool == ToolType.TransTool && toolType != ToolType.TransTool) { drawing.ApplyTransform(); SelectionTouch.Active = false; CursorTouch.Active = true; } CurrentTool = toolType; }
private void Start() { Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; cursorController.HideCursor(); gameStart = false; gameOverMenu.SetActive(false); gameOver = false; if (mode.Equals("Practice")) { timer = 0f; } else { timer += 1f; } if (mode.Equals("Endless")) { score = 0; highScore = PlayerPrefs.GetInt("HighScore", 0); highScoreText.text = "High Score: " + highScore; } countDown += 1f; secondaryCanvas.enabled = false; canvasVisible = true; instructionsInGame.SetActive(true); instructionsMenu.SetActive(false); if (PlayerPrefs.GetString("ShowFPS", "On").Equals("Off")) { fpsText.gameObject.SetActive(false); } Application.targetFrameRate = Screen.currentResolution.refreshRate; SetRatingMarker(); }