public override void handleClick() { Debug.Log("clicked drill"); if (Salvaging.isActive()) { Salvaging.createNotification(this.gameObject); return; } if (salvaging) { return; } if (Time.time - lastClick < 0.2f) { return; } lastClick = Time.time; if (this.busy) { Notification.createNotification(this.gameObject, Notification.sprites.Working, "Working", Color.cyan, true); } else { this.doStart(); } }
public override void handleClick() { Debug.Log("clicked Mineralthingi"); if (salvaging) { return; } if (Salvaging.isActive()) { Salvaging.createNotification(this.gameObject); return; } if (this.getCurEnergy() < 5) { Notification.createNotification(this.gameObject, Notification.sprites.Energy_Low, "Not enough energy", Color.red); return; } this.busy = true; Notification.createNotification(this.gameObject, Notification.sprites.Working, "Processing...", Color.green, true); DeliveryRoutes.addRoute(this.gameObject, DeliveryRoutes.getClosest("dropBase", this.gameObject).gameObject, ressources.Iron); DeliveryRoutes.addRoute(this.gameObject, DeliveryRoutes.getClosest("dropBase", this.gameObject).gameObject, ressources.Gold); }
public override void handleClick() { Debug.Log("clicked Thing"); if (salvaging) { return; } if (Salvaging.isActive()) { Salvaging.createNotification(this.gameObject); return; } if (this.busy && this.getCurEnergy() > 3) { Notification.createNotification(this.gameObject, Notification.sprites.Working, "Working...", Color.green, true); } if (!this.busy && this.getCurEnergy() > 100) { doStart(); } else if (!this.busy && this.getCurEnergy() <= 100) { Notification.createNotification(this.gameObject, Notification.sprites.Energy_Low, "Not enough Energy", Color.red, false); } }
public void salvage() { Debug.Log("Got salvage request!"); this.salvaging = true; Salvaging.displayIndicator(this.gameObject); this.salvageStartHP = getHP().HP; this.network.Remove(this); }
public void handleClick() { if (Salvaging.isActive()) { Salvaging.createNotification(this.gameObject); return; } }
public void handleClick() { if (Salvaging.isActive()) { salvage(); return; } }
public virtual void handleClick() { Debug.Log("clicked structure"); if (salvaging) { return; } if (Salvaging.isActive()) { Salvaging.createNotification(this.gameObject); return; } }
public override void handleClick() { Debug.Log("clicked scrapburner"); if (salvaging) { return; } if (Salvaging.isActive()) { Salvaging.createNotification(this.gameObject); return; } this.busy = true; Notification.createNotification(this.gameObject, Notification.sprites.Working, "Burning...", Color.green, true); }
public override void handleClick() { Debug.Log("clicked dome"); if (Salvaging.isActive()) { Salvaging.createNotification(this.gameObject); return; } if (salvaging) { return; } if (Time.time - lastClick < 0.2f) { return; } lastClick = Time.time; if (this.getCurEnergy() >= 500 && !this.busy) { doClone(); Notification.createNotification(this.gameObject, Notification.sprites.Starting, this.getCurEnergy() + 500 + "/500", Color.green); } else if (this.busy) { Notification.createNotification(this.gameObject, Notification.sprites.Working, "", Color.blue, true); } else { Notification.createNotification(this.gameObject, Notification.sprites.Energy_Low, this.getCurEnergy() + "/500", Color.red); } }
public void salvage() { this.salvaging = true; Salvaging.displayIndicator(this.gameObject); }
public void onSalvage() { Salvaging.salvageTriggered(); }
public void salvage() { Debug.Log("Got salvage request!"); this.salvaging = true; Salvaging.displayIndicator(this.gameObject); }