コード例 #1
0
 /// <summary>Spawns harvesters on completed build process</summary>
 public void InitializeBuilt()
 {
     this.moneyManager   = GameObject.Find("/Main/Canvas/BackgroundTopStripRessources/TextDollar").GetComponent <MoneyManagement>();
     this.floatUpSpawner = GameObject.Find("/Main/Canvas/UXElemente").GetComponent <FloatUpSpawner>();
     this.mine           = transform.parent.transform.gameObject.GetComponentInChildren <BuildBuilding>().BuiltBuildings[2]; // .transform.GetChild(0).gameObject;
     this.AddHarvester(ref this.attachedHarvesters, ref this.moneyManager, this, this.mine);
 }
コード例 #2
0
 /// <summary>
 /// Gives the harvester all important values
 /// </summary>
 /// <param name="attachedOreRefinery">Ore Refinery to drive to</param>
 /// <param name="attachedMine">Mine to drive to</param>
 /// <param name="moneyManagement">Reference to the money pool</param>
 /// <param name="floatUpSpawner">Reference to the FloatUpSpawner</param>
 public void Initialize(OreRefinery attachedOreRefinery, GameObject attachedMine, ref MoneyManagement moneyManagement, FloatUpSpawner floatUpSpawner)
 {
     this.attachedOreRefinery = attachedOreRefinery;
     this.attachedMine        = attachedMine;
     this.moneyManagement     = moneyManagement;
     this.floatUpSpawner      = floatUpSpawner;
     AppPauseHandler.Harvesters.Add(this);
 }
コード例 #3
0
 /// <summary>
 /// Called to give a PlayerBackNotification all important variables
 /// </summary>
 /// <param name="notificationText">The text that is displayed on the notification</param>
 /// <param name="floatUpSpawner">Reference to the FloatUpSpawner</param>
 /// <param name="type">The type of resource that the player gets</param>
 /// <param name="secondsSincePause">The seconds the player paused the game</param>
 /// <param name="additionalMoney">The money the player gets additional to the secondsSincePause</param>
 /// <param name="soundController">The sound controller to play the sound</param>
 /// <param name="harvesters">List of all harvesters</param>
 public void Initialize(string notificationText, FloatUpSpawner floatUpSpawner, FloatUp.ResourceType type, long secondsSincePause, long additionalMoney, SoundController soundController, ref List <Harvester> harvesters)
 {
     this.NotificationText.text = notificationText;
     this.floatUpSpawner        = floatUpSpawner;
     this.type = type;
     this.secondsSincePause = secondsSincePause;
     this.additionalMoney   = additionalMoney;
     this.harvesters        = harvesters;
     this.soundController   = soundController;
 }