Esempio n. 1
0
    protected virtual void FollowToggle_OnValueChanged(bool value)
    {
        if (currentSheep != null)
        {
            if (value)
            {
                if (currentSheep.IsLookingOut())
                {
                    lookToggle.isOn = false;
                }

                currentSheep.Follow();
            }
            else
            {
                currentSheep.StopFollow();
            }
        }
    }
Esempio n. 2
0
    protected virtual void Sheep_OnSelection(SheepSelector s)
    {
        currentSheep = s.GetController();

        if (currentSheep != null)
        {
            currentSheep.OnMoveOrder += Sheep_OnMoveOrder;

            followToggle.SetIsOnWithoutNotify(currentSheep.IsFollowing());
            lookToggle.SetIsOnWithoutNotify(currentSheep.IsLookingOut());
        }
    }
Esempio n. 3
0
    void Sheep_OnSelect()
    {
        if (sheepController != null)
        {
            if (sheepController.IsFollowing())
            {
                followCircle.SetActive(true);
            }

            if (sheepController.IsLookingOut())
            {
                lookCircle.SetActive(true);
            }
        }
    }