示例#1
0
        public UnitBase(UnitBase setFrom)
        {
            unitName         = setFrom.unitName;
            perceptionData   = setFrom.perceptionData;
            currentLocation  = setFrom.currentLocation;
            previousLocation = setFrom.previousLocation;

            enemy   = setFrom.enemy;
            ID      = setFrom.ID++;
            chasing = setFrom.chasing;

            //Whenever you copy a unit, you know the starting state is the copied unit's most recent perception
            startingPerceptionState = setFrom.perceptionData;
        }
示例#2
0
 //Does this need to add a baseunit?
 public void AddUnit(UnitBase toAdd)
 {
     units[UnitType.Bender] = toAdd; //I think this removes bender
     GetUnitSquare[UnitType.Bender].UnitsPresent[UnitType.Bender] = true;
     //bender added
 }