private void OnPlayerSleep(BasePlayer player) { ShopBlock shopBlock = player.gameObject.GetComponent <ShopBlock>(); if (shopBlock == null) { return; } shopBlock.Dispose(); UnityEngine.Object.Destroy(shopBlock); }
void Awake() { instance = this; }