예제 #1
0
    public void Register(SlingShotController controller)
    {
        slingShotController = controller;

        if (slingShotController.HasBird())
        {
            slingShotController.NextBird();
        }

        isInGame = true;
    }
예제 #2
0
        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>();
        }