public void StartCombiner(CustomizationContainerDates ccd, string checkKey = "") { if (ccd.PersBase == PersonagemBase.feminino) { myBase = myMBase; } else { myBase = myHBase; } target = MonoBehaviour.Instantiate(myBase, myBase.transform.position, myBase.transform.rotation); target.gameObject.SetActive(true); SupportSingleton.Instance.InvokeOnEndFrame(() => { target.SetCustomDates(ccd); SupportSingleton.Instance.InvokeOnEndFrame(() => { Transform T = CombinerReallyStart(); MessageAgregator <MsgCombinationComplete> .Publish(new MsgCombinationComplete() { combined = T, checkKey = checkKey }); }); }); }
void Create(CustomizationContainerDates ccd) { tCombiner.StartCombiner(ccd); //GameObject G; //if (ccd.PersBase == PersonagemBase.feminino) //{ // secM.SetCustomDates(ccd); // G = secM.gameObject; // Destroy(secH.gameObject); //} //else //{ // Destroy(secM.gameObject); // secH.SetCustomDates(ccd); // G = secH.gameObject; //} }
public void StartCombiner(SectionCustomizationManager source, string checkKey = "") { //if (!source.masculino) // myBase = myMBase; //else // myBase = myHBase; triangles.Clear(); uvs.Clear(); materials.Clear(); boneWeights.Clear(); normals.Clear(); vertices.Clear(); weldVertices.Clear(); vertCount = 0; CustomizationContainerDates ccd = source.GetCustomDates(); StartCombiner(ccd, checkKey); }
bool MainState() { bool up = Input.GetKeyDown(KeyCode.W); bool down = Input.GetKeyDown(KeyCode.S); bool left = Input.GetKeyDown(KeyCode.A); bool right = Input.GetKeyDown(KeyCode.D); int change = (up ? -1 : 0) + (down ? 1 : 0); int hChange = (left ? -1 : 0) + (right ? 1 : 0); cMenu.ChangeOption(change); ChangeAction(hChange, cMenu.SelectedOption); if (Input.GetKeyDown(KeyCode.Return)) { MessageAgregator <MsgNegativeUiInput> .Publish(); MainAction(cMenu.SelectedOption); } else if (Input.GetKeyDown(KeyCode.Escape)) { MessageAgregator <MsgNegativeUiInput> .Publish(); EscapeAction(cMenu.SelectedOption); } else if (Input.GetKeyDown(KeyCode.Alpha1)) { #region SloteSaveCOnfirmation estado = EstadoDoMenu.confirmacaoAberta; confirmation.StartConfirmationPanel(() => { CustomizationContainerDates ccd = secManager.GetCustomDates(); ccd.Save(); estado = EstadoDoMenu.main; }, () => { estado = EstadoDoMenu.main; }, "Deseja salvar esse personagem no slote de salvamento único?", hideSelections: true); #endregion } else if (Input.GetKeyDown(KeyCode.Alpha2)) { #region sloteLoadConfirmation estado = EstadoDoMenu.confirmacaoAberta; confirmation.StartConfirmationPanel(() => { CustomizationContainerDates ccd = new CustomizationContainerDates(); ccd.Load(); secManager.SetCustomDates(ccd); estado = EstadoDoMenu.main; }, () => { estado = EstadoDoMenu.main; }, "Deseja carregar o personagem do slote de salvamento único?", hideSelections: true); #endregion } else if (Input.GetKeyDown(KeyCode.Alpha3)) { #region combineMeshConfirmation estado = EstadoDoMenu.confirmacaoAberta; confirmation.StartConfirmationPanel(() => { bool generoMasculino = secManager == secManagerH_Base; testMeshCombiner.StartCombiner(secManager); estado = EstadoDoMenu.main; }, () => { estado = EstadoDoMenu.main; }, "Combinar malhas?", hideSelections: true); #endregion } else if (Input.GetKeyDown(KeyCode.Alpha4)) { #region saveInTheArrayConfirmation estado = EstadoDoMenu.confirmacaoAberta; confirmation.StartConfirmationPanel(() => { ToSaveCustomizationContainer.Instance.Save(secManager.GetCustomDates()); estado = EstadoDoMenu.main; }, () => { estado = EstadoDoMenu.main; }, "Deseja salvar esse pernogem no vetor de personagens?", hideSelections: true); #endregion } else if (Input.GetKeyDown(KeyCode.Alpha5)) { #region loadOfTheArrrayConfirmation estado = EstadoDoMenu.confirmacaoAberta; confirmation.StartConfirmationPanel(() => { ToSaveCustomizationContainer.Instance.Load(); List <CustomizationContainerDates> lccd = ToSaveCustomizationContainer.Instance.ccds; if (lccd != null && lccd.Count > 0) { int i = UnityEngine.Random.Range(0, lccd.Count); secManager.SetCustomDates(lccd[i]); } else { Debug.Log(lccd); Debug.Log(lccd.Count); } secManager.gameObject.SetActive(false); SupportSingleton.Instance.InvokeOnEndFrame(() => { secManager.gameObject.SetActive(true); }); estado = EstadoDoMenu.main; }, () => { estado = EstadoDoMenu.main; }, "Deseja tentar carregar um pernogem do vetor de personagens?", hideSelections: true); #endregion } else if (Input.GetKeyDown(KeyCode.Alpha6)) { ToSaveCustomizationContainer.Instance.Load(); StartCharactersSavedMenu(); } return(false); }
private bool CharacterSaveChangesState() { int change = -CommandReader.GetIntTriggerDown("vertical", Controlador.teclado); if (change != 0) { charDbMenu.ChangeOption(change); List <CustomizationContainerDates> lccd = ToSaveCustomizationContainer.Instance.ccds; ChangeBaseCharacter(lccd[charDbMenu.SelectedOption].PersBase == PersonagemBase.masculino); SupportSingleton.Instance.InvokeOnEndFrame(() => { secManager.SetCustomDates(lccd[charDbMenu.SelectedOption]); }); } else if (Input.GetKeyDown(KeyCode.Return)) { cMenu.StartHud(secManager, MainAction, ChangeAction, EscapeAction, activeEditables); charDbMenu.FinishHud(); estado = EstadoDoMenu.main; } else if (Input.GetKeyDown(KeyCode.Escape)) { estado = EstadoDoMenu.confirmacaoAberta; confirmation.StartConfirmationPanel( () => { ToSaveCustomizationContainer.Instance.ccds.RemoveAt(charDbMenu.SelectedOption); ToSaveCustomizationContainer.Instance.SaveLoaded(); charDbMenu.FinishHud(); StartCharactersSavedMenu(); estado = EstadoDoMenu.characterSaveChanges; }, () => { estado = EstadoDoMenu.characterSaveChanges; }, "Gostaria de deletar esse personagem do vetor?", hideSelections: true); } else if (Input.GetKeyDown(KeyCode.Alpha1)) { //charDbMenu.FinishHud(); estado = EstadoDoMenu.inputTextOpened; inputTextManager.StartHud(() => { CustomizationContainerDates ccd = ToSaveCustomizationContainer.Instance.ccds[charDbMenu.SelectedOption]; ccd.Sid = inputTextManager.TextContent; ToSaveCustomizationContainer.Instance.SaveLoaded(); int guard = charDbMenu.SelectedOption; charDbMenu.FinishHud(); StartCharactersSavedMenu(guard); inputTextManager.FinishHud(); estado = EstadoDoMenu.characterSaveChanges; }, () => { //inputTextManager.FinishHud(); //charDbMenu.FinishHud(); //StartCharactersSavedMenu(); estado = EstadoDoMenu.characterSaveChanges; }, "Escolha um nome, que será identificador ID, para esse personagem"); } return(true); }