public void StartHud( SectionCustomizationManager secManager, System.Action <int> mainAction, System.Action <int, int> changeAction, System.Action <int> returnAction, CustomizationManagerMenu.EditableElements[] dasOpcoes, ResizeUiType tipoDeR = ResizeUiType.vertical, int selectIndex = 0 ) { this.secManager = secManager; this.opcoes = dasOpcoes; this.returnAction += returnAction; this.changeAction += changeAction; this.MainAction += (int x) => { if (!estadoDeAcao) { estadoDeAcao = true; ChangeSelectionTo(x); SupportSingleton.Instance.InvokeInRealTime(() => { Debug.Log("Função chamada com delay para destaque do botão"); mainAction(x); estadoDeAcao = false; }, .05f); } }; StartHud(opcoes.Length, tipoDeR, selectIndex); }
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 }); }); }); }
public virtual void SetOptions( Action <int> mainAction, Action <int> returnAction, Action <int, int> horizontalChange, CustomizationManagerMenu.EditableElements opcao, SectionCustomizationManager scm ) { this.scm = scm; ThisAction += mainAction; this.horizontalChange += horizontalChange; this.returnAction += returnAction; txtDaOpcao.text = opcao.displayName; switch (opcao.type) { case CustomizationManagerMenu.EditableType.color: SupportSingleton.Instance.InvokeOnEndFrame(() => { viewColorImg.transform.parent.gameObject.SetActive(true); Color C = scm.GetColorOfMember(opcao.member, opcao.inIndex); C.a = 1; viewColorImg.color = C; }); break; case CustomizationManagerMenu.EditableType.mesh: case CustomizationManagerMenu.EditableType.texture: controlButtonsContainer.SetActive(true); break; } }
public void SetDates( TesteMeshCombiner meshCombiner, SectionCustomizationManager secManager) { this.meshCombiner = meshCombiner; this.secManager = secManager; }
public static void InitProvisionalStartGame( TesteMeshCombiner meshCombiner, SectionCustomizationManager secManager) { GameObject G = new GameObject(); ProvisionalStartGame P = G.AddComponent <ProvisionalStartGame>(); P.SetDates(meshCombiner, secManager); P.Init(); }
void ChangeBaseCharacter(bool masculino) { if (masculino) { secManager = secManagerH_Base; sdbc = sdbc_H; } else { secManager = secManagerM_Base; sdbc = sdbc_M; } secManagerH_Base.gameObject.SetActive(masculino); secManagerM_Base.gameObject.SetActive(!masculino); }
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); }
// Use this for initialization void Start() { SupportSingleton.Instance.InvokeOnEndFrame(() => { MessageAgregator <MsgStartMusic> .Publish(new MsgStartMusic() { clip = menuMusic }); }); //menusAtivos &= ~FlagSectionDataBase.pupila; if (secManager is null) { secManager = FindObjectOfType <SectionCustomizationManager>(); } if (sdbc is null) { sdbc = FindObjectOfType <SectionDataBaseContainer>(); } //string[] StartOptions = GetActiveOption(ActiveEditables); activeEditables = ActiveEditables; cMenu.StartHud(secManager, MainAction, ChangeAction, EscapeAction, activeEditables); SupportSingleton.Instance.InvokeOnEndFrame(() =>// acontecia do evento ser publicado antes da camera estar pronta { MessageAgregator <MsgChangeMenuDb> .Publish(new MsgChangeMenuDb() { sdb = activeEditables[0].mySDB }); }); MessageAgregator <MsgChangeOptionUI> .AddListener(OnUiChange); MessageAgregator <MsgSelectedColorByClick> .AddListener(OnSelectColorByClick); MessageAgregator <MsgFinishEdition> .AddListener(OnFinishEdition); }