예제 #1
0
파일: Actions.cs 프로젝트: mcmelmon/archfey
    public void CallForHelp()
    {
        List <Actor> friends = Decider.IdentifyFriends();

        // TODO: this should be possible as a Select, but there are type problems, and may be a problem if
        // actors are destroyed in process
        for (int i = 0; i < friends.Count; i++)
        {
            if (Me == null)
            {
                break;
            }
            if (friends[i] != null && !friends[i].Actions.Decider.FriendsInNeed.Contains(Me))
            {
                if (friends[i].GetComponent <Guard>() != null || Me.GetComponent <Guard>() != null)
                {
                    friends[i].Actions.Decider.FriendsInNeed.Add(Me);
                }
            }
        }
    }