/// <summary> Execute the UIAction </summary> public void Execute() { if (Actions == null) { if (DebugComponent) { DDebug.Log("UIAction is null!", gameObject); } return; } Actions.Invoke(gameObject); }
/// <summary> Trigger the Actions </summary> public void TriggerActions() { Actions.Invoke(gameObject); if (!DisableTriggerAfterActivation) { return; } m_actionTriggered = true; if (ResetAfterDelay) { m_resetCoroutine = StartCoroutine(ExecuteResetTrigger()); } }
void CoreGUI_Horizontal() { bool isLeft = position == UIPosition.UpperLeft || position == UIPosition.LowerLeft; GUILayout.BeginHorizontal(); if (!isLeft) { GUILayout.FlexibleSpace(); } UIAction?.Invoke(); if (isLeft) { GUILayout.FlexibleSpace(); } GUILayout.EndHorizontal(); }
void CoreGUI_Vertical() { bool isUp = position == UIPosition.UpperLeft || position == UIPosition.UpperRight; GUILayout.BeginVertical(); if (!isUp) { GUILayout.FlexibleSpace(); } UIAction?.Invoke(); if (isUp) { GUILayout.FlexibleSpace(); } GUILayout.EndVertical(); }
void CoreGUI() { if (horizontal) { GUILayout.BeginHorizontal(); } else { GUILayout.BeginVertical(); } UIAction?.Invoke(); if (horizontal) { GUILayout.EndHorizontal(); } else { GUILayout.EndVertical(); } }