コード例 #1
0
ファイル: ActionToggle.cs プロジェクト: cpttrvs/To-Herd
    protected virtual void LookToggle_OnValueChanged(bool value)
    {
        if (currentSheep != null)
        {
            if (value)
            {
                if (currentSheep.IsFollowing())
                {
                    followToggle.isOn = false;
                }

                currentSheep.LookOut();
            }
            else
            {
                currentSheep.StopLookOut();
            }
        }
    }
コード例 #2
0
ファイル: ActionToggle.cs プロジェクト: cpttrvs/To-Herd
    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());
        }
    }
コード例 #3
0
    void Sheep_OnSelect()
    {
        if (sheepController != null)
        {
            if (sheepController.IsFollowing())
            {
                followCircle.SetActive(true);
            }

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