示例#1
0
    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);
    }
示例#2
0
    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);
    }