private IEnumerator ItemRespawnCoroutine() { Debug.Log("Item respawn coroutine started!"); while (true) { yield return(new WaitForSeconds(this.itemsResetIntervalInSeconds)); NetworkChat.sendChat("Respawning items..."); this.resetItems(); } }
private void RefuelVehicles(CommandArgs args) { Vehicle[] array = UnityEngine.Object.FindObjectsOfType(typeof(Vehicle)) as Vehicle[]; Vehicle[] array2 = array; for (int i = 0; i < array2.Length; i++) { Vehicle vehicle = array2 [i]; vehicle.fill(1000); } NetworkChat.sendChat(string.Concat(new object[] { "Refueled ", array.Length, " vehicles!" })); }
private void RepairVehicles(CommandArgs args) { Vehicle[] array = UnityEngine.Object.FindObjectsOfType(typeof(Vehicle)) as Vehicle[]; Vehicle[] array2 = array; for (int i = 0; i < array2.Length; i++) { Vehicle vehicle = array2 [i]; vehicle.networkView.RPC("tellExploded", RPCMode.All, new object[] { false }); vehicle.networkView.RPC("tellWrecked", RPCMode.All, new object[] { false }); vehicle.heal(1000); } NetworkChat.sendChat(string.Concat(new object[] { "Repaired ", array.Length, " vehicles!" })); }
public void SaveAll(CommandArgs args) { NetworkChat.sendChat("Saving world to database..."); NetworkTools.save(); }