void EscapeAction(int index) { EditableElements target = activeEditables[index]; if (target.type != EditableType.control && target.member != SectionDataBase.@base) { FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(target.member.ToString()); if (menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; RestartMenu(GetEditableElementBySdb(target.member)); } } else if (target.type == EditableType.control) { SectionDataBase sdb = sdbc.GetChangebleElementWithId(target.member)[target.outIndex].subsection[target.inIndex]; FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()); if (menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; RestartMenu(target); } else if (target.member != SectionDataBase.@base) { EscapeAction(index - 1); } } }
private void ChangeAction(int change, int index) { EditableElements target = activeEditables[index]; if (target.type == EditableType.control) { if (change != 0) { SectionDataBase sdb = sdbc.GetChangebleElementWithId(target.member)[target.outIndex].subsection[target.inIndex]; FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()); if (change > 0 && !menusAtivos.HasFlag(flag)) { menusAtivos |= flag; } else if (change < 0 && menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; } RestartMenu(target); } } else if (target.type == EditableType.mesh || target.type == EditableType.texture) { if (change != 0) { ChangeElementMainAction(target, change); } } }
public static NomesCenas[] DescarregarCenasDesnecessarias(NomesCenas[] N) { System.Collections.Generic.List <NomesCenas> retorno = new System.Collections.Generic.List <NomesCenas>(); for (int i = 0; i < SceneManager.sceneCount; i++) { Scene S = SceneManager.GetSceneAt(i); //Debug.Log("tentativa de string para enum: " + StringParaEnum.ObterEnum<NomesCenasEspeciais>(S.name)); if (S.isLoaded && S.name != NomesCenasEspeciais.ComunsDeFase.ToString() && S.name != NomesCenasEspeciais.CenaDeCarregamento.ToString()) { if (S.isLoaded) { bool foi = false; for (int j = 0; j < N.Length; j++) { if (S.name == N[j].ToString()) { foi = true; } } if (!foi) { retorno.Add(StringForEnum.GetEnum <NomesCenas>(S.name)); } } } } return(retorno.ToArray()); }
void ControlMainAction(EditableElements target) { SectionDataBase sdb = sdbc.GetChangebleElementWithId(target.member)[target.outIndex].subsection[target.inIndex]; FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()); if (menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; } else { menusAtivos |= flag; } RestartMenu(target); }
bool VerifyActiveDbView(SectionDataBase sdb) { return(menusAtivos.HasFlag(StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()))); }