void Awake() { if (s_Instance != null) { Destroy(gameObject); } s_Instance = this; }
void OnTargetCollected() { catched = true; closedTick = DateTime.Now.Ticks; bool result = CollectTaskManager.FinishTask(TaskIndex); if (result) { // show disappear effects // Destroy(gameObject); gameObject.SetActive(false); AudioPlayer.PlaySE(AudioPlayer.AudioName.Collected); } }