private void KillResource() { StopAllCoroutines(); CollectResourceEvent?.Invoke(this, new ResourceV2Args(this)); AddResourceEvent?.Invoke(this, new AddResourceArgs(resource_amount, resource_name)); OnDespawn?.Invoke(this, new ResourceV2Args(this)); Destroy(gameObject); }
private void OnMouseOver() { CollectResourceEvent?.Invoke(this, new CollectResourceArgs(this)); }