public void SendMercenaryToCamp(MercenaryType mercenaryType, IBuildingInfo campInfo, IBuildingInfo factoryInfo) { GameObject mercenary = this.GenerateMercenary(mercenaryType); TilePosition initialPoint = BorderPointHelper.FindValidInflateOneBorderPoint(factoryInfo); mercenary.transform.position = PositionConvertor.GetWorldPositionFromActorTileIndex(initialPoint); ArmyAI ai = mercenary.GetComponent <ArmyAI>(); ai.SendArmyToCamp(campInfo); }
public void SendArmyToCamp(ArmyType armyType, int level, IBuildingInfo campInfo, IBuildingInfo factoryInfo) { GameObject army = this.GenerateArmy(armyType, level); TilePosition initialPoint = BorderPointHelper.FindValidInflateOneBorderPoint(factoryInfo); army.transform.position = PositionConvertor.GetWorldPositionFromActorTileIndex(initialPoint); ArmyAI ai = army.GetComponent <ArmyAI>(); ai.SendArmyToCamp(campInfo); }