/*private void OnMouseOver() * { * if (GameManager.instance.player.GetComponent<PlayerMovement>().isControllsLocked == false && Input.GetMouseButtonDown((int)MouseButton.RightMouse)) * { * Rigidbody2D rb = GetComponent<Rigidbody2D>(); * rb.velocity = new Vector2(0f, 0f); * rb.MovePosition(spawnPos); * } * }*/ public void ReachedGoal() { spawner.ReachedGoal(); StartCoroutine(FadeAndDestroy(0.25f)); }