示例#1
0
 void Unload()
 {
     Puts("Cleaning up spawned objects...");
     foreach (var nwv in ChestList)
     {
         Singleton <HNetworkManager> .Instance.NetDestroy(HNetworkExtensions.HNetworkView(nwv));
     }
     Puts("Done");
 }
示例#2
0
 void Destroy(HNetworkView nwv)
 {
     timer.Once(Convert.ToSingle(Config["SecondsTillDestroy"]), () =>
     {
         if (nwv != null)
         {
             ChestList.Remove(nwv);
             Singleton <HNetworkManager> .Instance.NetDestroy(HNetworkExtensions.HNetworkView(nwv));
         }
     });
 }