private IEnumerator DisableSchedule() { PersistentDataManager.SetDirty(this); //Wait for seconds before disable because if we disable this gameobject to soon, the coroutines will be interrupted yield return(new WaitUntil(() => (!m_OrthoSizeChanging && !m_FollowPointChanging))); gameObject.SetActive(false); }
void OnTriggerEnter2D(Collider2D other) { if (!targetLayers.Contains(other.gameObject)) { return; } if (triggerType == TriggerType.Once && m_AlreadyTriggered) { return; } director.Play(); m_AlreadyTriggered = true; PersistentDataManager.SetDirty(this); OnDirectorPlay.Invoke(); Invoke("FinishInvoke", (float)director.duration); }
public void Save() { PersistentDataManager.SetDirty(this); }
public void OverrideAlreadyTriggered(bool alreadyTriggered) { m_AlreadyTriggered = alreadyTriggered; PersistentDataManager.SetDirty(this); }