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