Ejemplo n.º 1
0
 public static bool TargetIsCompatible(this UnitTargetType tt, Unit unit, Unit target)
 {
     if ((tt & UnitTargetType.Self) != 0 && unit == target)
     {
         return(true);
     }
     if ((tt & UnitTargetType.Ally) != 0 && unit != target && unit.team == target.team)
     {
         return(true);
     }
     if ((tt & UnitTargetType.Enemy) != 0 && unit.team != target.team)
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public EntityTarget(UnitTargetTeam team, UnitTargetType type, UnitTargetFlags flags, int maxTar = -1, Vector3 center = default(Vector3))
 {
     this.tarTeam  = team;
     this.tarType  = type;
     this.tarFlags = flags;
 }