public void FusionWithCloseHandle() { if (CloseHandle == null) { return; } OnFusion.Invoke(this); CloseHandle.OnMoved.Invoke(CloseHandle); foreach (UnityAction <LowPolyPointHandle> action in moveActions) { CloseHandle.AddMoveAction(action); } foreach (UnityAction <LowPolyPointHandle> action in destroyActions) { CloseHandle.AddDestroyAction(action); } foreach (UnityAction <LowPolyPointHandle> action in fusionActions) { CloseHandle.AddFusionAction(action); } RemoveAllListeners(); DestroyImmediate(gameObject); }
private void OnDestroy() { if (OnDestroyed != null) { OnDestroyed.Invoke(this); } RemoveAllListeners(); }
private void Update() { if (permanent == false && moveActions.Count == 0 && destroyActions.Count == 0) { DestroyImmediate(gameObject); return; } if (transform.hasChanged) { OnMoved.Invoke(this); LastPosition = transform.position; transform.hasChanged = false; } }
public void Notify(object eventData) { HandleEvent?.Invoke(eventData); }
public void TriggerEvent(object value = null) { HandleEvent?.Invoke(value); }
public void TriggerEvent(GameEnum gameEnum) { HandleEvent?.Invoke(gameEnum); }