コード例 #1
0
        private IEnumerator ItemRespawnCoroutine()
        {
            Debug.Log("Item respawn coroutine started!");
            while (true)
            {
                yield return(new WaitForSeconds(this.itemsResetIntervalInSeconds));

                NetworkChat.sendChat("Respawning items...");
                this.resetItems();
            }
        }
コード例 #2
0
        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!"
            }));
        }
コード例 #3
0
        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!"
            }));
        }
コード例 #4
0
 public void SaveAll(CommandArgs args)
 {
     NetworkChat.sendChat("Saving world to database...");
     NetworkTools.save();
 }