示例#1
0
        public bool IsMatch(Alliance other, Targets targets)
        {
            bool isMatch = false;

            switch (targets)
            {
            case Targets.Self:
                isMatch = other == this;
                break;

            case Targets.Ally:
                isMatch = type == other.type;
                break;

            case Targets.Foe:
                isMatch = (type != other.type) && other.type != Alliances.Neutral;
                break;
            }
            return(isConfused ? !isMatch : isMatch);
        }
 private static void AddAlliance(GameObject obj, Alliances type)
 {
     Tactical.Actor.Component.Alliance alliance = obj.AddComponent <Tactical.Actor.Component.Alliance>();
     alliance.type = type;
 }