예제 #1
0
        public void createNewUnitAndRegister(Player owner, clsUnitType newUnitType, Sektor targetSektor)
        {
            clsUnit newUnit = new clsUnit(newUnitType);
            newUnit.strOwnerID = owner.Id;
            owner.ListUnits.Add(newUnit);
            targetSektor.addUnit(newUnit);

            this.onTick += new delTick(newUnit.CampaignController_onTick);
        }
예제 #2
0
 public clsUnit addUnit(Player owner, clsUnit newUnit, Sektor sektor)
 {
     newUnit.strOwnerID = owner.Id;
     owner.ListUnits.Add(newUnit);
     sektor.addUnit(newUnit);
     return newUnit;
 }