示例#1
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());
        }
    }
示例#2
0
    protected virtual void Sheep_OnDeselection(SheepSelector s)
    {
        currentSheep.OnMoveOrder -= Sheep_OnMoveOrder;

        currentSheep = null;
    }
示例#3
0
 void SheepSelector_OnDeselection(SheepSelector s)
 {
     Debug.Log("[Sheep] OnDeselection: " + name);
     isSelected = false;
     OnDeselect?.Invoke();
 }