void OnTriggerExit2D(Collider2D c) { if (c.gameObject.name == "Mouse") { mainCamera.deleteDrawingOfScreen(drawBubble); drawBubble = null; target.GetComponent <playerController>().set_speed(o_speed); } }
void drawKey() { if (playerScript.getKeyState() && keyDraw == null) { keyDraw = new DrawScreen("key1", textureKey, 30, false); cameraScript.addDrawingToScreen(keyDraw); } else if (!playerScript.getKeyState() && keyDraw != null) { cameraScript.deleteDrawingOfScreen(keyDraw); keyDraw = null; } }