/// <summary> /// Showing canvas group sent thought parameter and disabling all others /// </summary> /// <param name="canvasGroup"></param> public void OpenTable(BaseObjectDisabler objectDisabler) { HideAllTables(); var namedGroup = GetNamedGroup(objectDisabler); if (namedGroup == null) { return; } namedGroup.value.DisplayObject(true); SetText(namedGroup); }
/// <summary> /// Showing canvas group sent thought parameter with delay and disabling all others /// </summary> /// <param name="objectDisabler"></param> public void DelayedOpenTable(BaseObjectDisabler objectDisabler) { HideAllTables(); var namedGroup = GetNamedGroup(objectDisabler); if (namedGroup == null) { return; } SetText(namedGroup); StartCoroutine(namedGroup.value.DisplayObject(true, delayTime, (canvas) => { namedGroup.value = canvas; })); }
private NamedDisabler GetNamedGroup(BaseObjectDisabler objectDisabler) { var namedGroup = tableNamedDisabler.FirstOrDefault(n => n.value.GetHashCode() == objectDisabler.GetHashCode()); return(namedGroup); }