public void CopyCampaignFleet(CampaignFleet campaignFleet, Vector3 position, Vector3 direction) { this.factionID = campaignFleet.OwnerID; deploymentZoneCenter = position; deploymentZoneSize = new Vector3(400, 10, 400); deploymentZoneObject = (GameObject)Instantiate(deplomentZonePrefab); deploymentZoneObject.transform.position = deploymentZoneCenter; deploymentZoneObject.transform.localScale = deploymentZoneSize * 2; int x = 0; foreach (CampaignSquadron campaignSquadron in campaignFleet.squadrons) { Vector3 squadronPosition = new Vector3(0, 0, x * 1000) + position; GameObject sqrObject = (GameObject)Instantiate(squadronObject, squadronPosition, Quaternion.identity); sqrObject.transform.parent = this.transform; Squadron squadron = sqrObject.GetComponent<Squadron>(); squadron.factionID = this.factionID; squadron.name = campaignSquadron.Name; squadron.CopyFromCampaignSquadron(campaignSquadron, squadronPosition, direction); AddSquadron(squadron); foreach (Ship ship in squadron.ships) { ships.Add(ship); } x++; } this.transform.Rotate(direction); }
public override void CheckFleetRequirements(CampaignFleet fleet) { if (fleet.ContainsSquadron("Colony Ship")) { canColonize = true; } canColonize = true; }
public void AddFleet(CampaignFleet fleet) { fleet.Battle += Battle; fleet.NewFleet += AddFleet; fleet.RemoveFleet += RemoveFleet; fleet.OwnerID = this.factionID; fleet.fleetColor = this.factionColor; fleets.Add(fleet); fleet.gameObject.transform.parent = this.transform.parent; }
public void AddFleet(CampaignFleet arrivingFleet) { fleets.Add(arrivingFleet); UpdateFleetIcons(); UpdateCanColonize(); foreach (CampaignFleet fleet in fleets) { if (fleet.OwnerID != arrivingFleet.OwnerID) { BattleManager battleManager = GameObject.Find("BattleManager").GetComponent<BattleManager>(); battleManager.SetFleets(arrivingFleet, fleet); break; } } }
public void RemoveFleet(CampaignFleet fleet) { if (fleet.currentPlanet != null) { fleet.currentPlanet.RemoveFleet(fleet); } fleets.Remove(fleet); GameObject.Destroy(fleet); }
public void AddFleet(CampaignFleet fleet) { fleets.Add(fleet); UpdateSolarSystemInfoFleets(); }
public void RemoveFleet(CampaignFleet fleet) { fleets.Remove(fleet); UpdateSolarSystemInfoFleets(); }
public void SelectFleet(CampaignFleet fleet) { selectedFleet = fleet; }
public void DeselectFleet() { selectedFleet = null; }
public void RemoveFleet(CampaignFleet fleet) { fleets.Remove(fleet); UpdateFleetIcons(); UpdateCanColonize(); }
public virtual void CheckFleetRequirements(CampaignFleet fleet) { }
void Close() { campaignFleetAttackingFleet = null; campaignFleetDefendingFleet = null; _isActive = false; }
/// <summary> /// Set the fleets participating in the battle /// </summary> /// <param name="campaignAttackingFleet">The Attacking Fleet</param> /// <param name="campaignDefendingFleet">The Defending Fleet</param> public void SetFleets(CampaignFleet campaignAttackingFleet, CampaignFleet campaignDefendingFleet) { campaignFleetAttackingFleet = campaignAttackingFleet; campaignFleetDefendingFleet = campaignDefendingFleet; Open(); }
public AIObjectiveExplore(CampaignFleet fleet) { }
public AIObjectiveBuildFleet(CampaignFleet fleet) { }