public void Register(SlingShotController controller) { slingShotController = controller; if (slingShotController.HasBird()) { slingShotController.NextBird(); } isInGame = true; }
private void SetSlingShotController() { if (GameObject.FindGameObjectWithTag(TagUtil.SlingShot) == null) { throw new MissingTagException(TagUtil.SlingShot); } if (GameObject.FindGameObjectWithTag(TagUtil.SlingShot).GetComponent <SlingShotController>() == null) { throw new CustomMissingComponentException(TagUtil.SlingShotController); } _slingShotController = GameObject.FindGameObjectWithTag(TagUtil.SlingShot).GetComponent <SlingShotController>(); }