public void StartGrup() { if (!m_StartGroup && groups.Length > 0) { m_StartGroup = groups[0]; //Debug.Log("Start Group now is: " + m_StartGroup.gameObject.name); } currentGroup = m_StartGroup; StartGroup(m_StartGroup); }
public void SwitchGroup(UI_System aGroup) { if (aGroup && currentGroup != aGroup) { if (currentGroup) { //Debug.Log(gameObject.name + ": Switching group " + currentGroup.gameObject.name + " to " + "<color=#" + ColorUtility.ToHtmlStringRGB(Color.yellow) + ">" + aGroup.gameObject.name + "</color>"); //CloseGroup(currentGroup); previousGroup = currentGroup; } currentGroup = aGroup; //StartGroup(aGroup); Handled by animation if (MenuEvents.groupChange != null) { MenuEvents.groupChange.Invoke(previousGroup, currentGroup); } } }
public void CloseGroup(UI_System aGroup) { //Debug.Log(gameObject.name + ": Closing group " + "<color=#" + ColorUtility.ToHtmlStringRGB(Color.yellow) + ">" + aGroup.gameObject.name + "</color>"); aGroup.gameObject.SetActive(false); }
public void StartGroup(UI_System aGroup) { //Debug.Log(gameObject.name + ": Starting group " + "<color=#" + ColorUtility.ToHtmlStringRGB(Color.yellow) + ">" + aGroup.gameObject.name + "</color>"); aGroup.gameObject.SetActive(true); aGroup.transform.SetAsLastSibling(); }