예제 #1
0
        internal void AssignUnit(IFlocking unit)
        {
            mUnits.Add(unit);
            unit.AddGroup(this);
            if (Speed == 0)
            {
                Speed = unit.Speed;
            }
            else
            {
                if (unit.Speed >= Speed)
                {
                    return;
                }

                Speed = unit.Speed;
            }
        }
예제 #2
0
 public bool Kill(IFlocking unit)
 {
     return(mUnits.Remove(unit));
 }
예제 #3
0
 public bool RemoveUnit(IFlocking unit)
 {
     return(mUnits.Remove(unit));
 }
예제 #4
0
 public void AddSelected(IFlocking unit)
 {
     mSelected.Add(unit);
 }