Example #1
0
    void ComunsCarregado()
    {
        if (ExistenciaDoController.AgendaExiste(ComunsCarregado, this))
        {
            fase = FasesDoLoad.carregando;
            S    = new LoadAndSaveGame().Load(indiceDoJogo);
            if (S == null)
            {
                a2    = new AsyncOperation[1];
                a2[0] = SceneManager.LoadSceneAsync("MbInfinity", LoadSceneMode.Additive);
            }
            else
            {
                a2 = new AsyncOperation[S.VariaveisChave.CenasAtivas.Count];
                for (int i = 0; i < a2.Length; i++)
                {
                    a2[i] = SceneManager.LoadSceneAsync(S.VariaveisChave.CenasAtivas[i].ToString(), LoadSceneMode.Additive);
                }
            }
            Time.timeScale = 0;

            SceneManager.sceneLoaded -= CarregouComuns;
            SceneManager.sceneLoaded += SetarCenaPrincipal;
        }
    }
        // Use this for initialization
        void Start()
        {
            if (mudavel == null)
            {
                mudavel = transform;
            }

            if (ExistenciaDoController.AgendaExiste(Start, this))
            {
                for (int i = 0; i < mover.Length; i++)
                {
                    mover[i].VerificaMudarPos(mudavel);
                }

                for (int i = 0; i < desligarEntre.Length; i++)
                {
                    if (desligarEntre[i].Pode())
                    {
                        gameObject.SetActive(false);
                    }
                }

                for (int i = 0; i < ligarEntre.Length; i++)
                {
                    if (ligarEntre[i].Pode())
                    {
                        gameObject.SetActive(true);
                    }
                }
            }
        }
Example #3
0
    void ComoPode()
    {
        if (ExistenciaDoController.AgendaExiste(ComoPode, this))
        {
            Debug.Log(GameController.g + "  segunda vez");
            CharacterManager manager = GameController.g.Manager;
            AplicadorDeCamera.cam.transform.position = S.Posicao + new Vector3(0, 12, -10); //new Vector3(483, 12f, 745);
            manager.transform.position = S.Posicao;                                         //new Vector3(483,1.2f,755);
            manager.transform.rotation = S.Rotacao;
            manager.Dados = S.Dados;
            GameController.g.ReiniciarContadorDeEncontro();

            if (manager.CriatureAtivo != null)
            {
                MonoBehaviour.Destroy(manager.CriatureAtivo.gameObject);
                manager.InserirCriatureEmJogo();
                manager.CriatureAtivo.transform.position = S.Posicao + new Vector3(0, 0, 1);//new Vector3(483, 1.2f, 756);
            }


            manager.Dados.ZeraUltimoUso();
            GameController.g.MyKeys = S.VariaveisChave;
            GameController.g.Salvador.SetarJogoAtual(indiceDoJogo);

            podeIr = true;
        }
    }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         myKeys = GameController.g.MyKeys;
     }
 }
Example #5
0
 protected virtual void Start()
 {
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         EventAgregator.Publish(new StandardSendGameEvent(EventKey.destroyShiftCheck, ID, gameObject));
     }
 }
 public static void StaticStart(System.Action a, MonoBehaviour m, string ID)
 {
     if (ExistenciaDoController.AgendaExiste(a, m))
     {
         EventAgregator.Publish(new StandardSendGameEvent(EventKey.destroyShiftCheck, ID, m.gameObject));
     }
 }
Example #7
0
        // Use this for initialization
        void Start()
        {
            textoDoBotao = BancoDeTextos.RetornaListaDeTextoDoIdioma(ChaveDeTexto.textoBaseDeAcao)[1];

            if (ExistenciaDoController.AgendaExiste(Start, this))
            {
                if (GameController.g.MyKeys.VerificaAutoShift(chave))
                {
                    for (int i = 0; i < rockShift.Length; i++)
                    {
                        rockShift[i].rock.transform.position = new melhoraPos().novaPos(rockShift[i].target.position) + Vector3.up;
                        gameObject.SetActive(false);
                    }
                }
                else
                {
                    if (posDeEscondido == Vector3.zero)
                    {
                        posDeEscondido = new Vector3(transform.position.x, -2.5f, transform.position.z);
                    }

                    for (int i = 0; i < rockShift.Length; i++)
                    {
                        rockShift[i].posOriginal = rockShift[i].rock.transform.position;
                        rockShift[i].rock.GetComponent <RockMovePuzzle>().RockManager = this;
                    }

                    posInicial = transform.position;
                }
            }
        }
    new void Start()
    {
        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            KeyVar keys = GameController.g.MyKeys;


            Debug.Log("Conversou primeiro com Derek: " + keys.VerificaAutoShift(KeyShift.conversouPrimeiroComDerek) +
                      " - venceu Derek: " + keys.VerificaAutoShift(KeyShift.venceuDerekPrimeiraVez));


            if (keys.VerificaAutoShift(KeyShift.conversouPrimeiroComDerek) && keys.VerificaAutoShift(KeyShift.venceuDerekPrimeiraVez))
            {
                if (keys.VerificaAutoShift(KeyShift.entreouCanetaDeIan))
                {
                    npc = npcIan;
                }
                else
                {
                    MbItens.RetirarUmItem(GameController.g.Manager, PegaUmItem.Retorna(nomeIDitem.canetaSagradaDeLog), 1);
                }
            }
            else if (!keys.VerificaAutoShift(KeyShift.conversouPrimeiroComDerek) && !keys.VerificaAutoShift(KeyShift.venceuDerekPrimeiraVez))
            {
                Debug.Log("Ué....");
                npc = npcMov;
            }

            base.Start();
        }
    }
 // Start is called before the first frame update
 void Start()
 {
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         posInicial = boss.transform.position;
         EventAgregator.Publish(new StandardSendGameEvent(EventKey.destroyFixedShiftCheck, KeyShift.venceuCirculoImperfeito, gameObject));
     }
 }
    private void Start()
    {
        SempreEstaNoTrigger();

        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            EventAgregator.Publish(new StandardSendGameEvent(EventKey.destroyShiftCheck, ID, gameObject));
        }
    }
Example #11
0
 // Use this for initialization
 void Start()
 {
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         npcLuta = ativaLut.NPC_Luta;
         g       = GameController.g;
         keys    = g.MyKeys;
     }
 }
    protected override void Start()
    {
        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            EventAgregator.Publish(new StandardSendGameEvent(EventKey.enemyDefeatedCheck, ID, gameObject));

            base.Start();
        }
    }
Example #13
0
 void Start()
 {
     textoDoBotao = BancoDeTextos.RetornaFraseDoIdioma(ChaveDeTexto.textoBaseDeAcao);
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         dispara = GameController.g.HudM.DisparaT;
         t       = BancoDeTextos.RetornaListaDeTextoDoIdioma(ChaveDeTexto.primeiroArmagedom).ToArray();
     }
 }
 protected void Start()
 {
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         if (GameController.g.MyKeys.VerificaAutoShift(EstaKey))
         {
             Destroy(gameObject);
         }
     }
 }
Example #15
0
        // Use this for initialization
        void Start()
        {
            if (ExistenciaDoController.AgendaExiste(Start, this))
            {
                dados = GameController.g.Manager.Dados;

                /*
                 * if (Dono)
                 * {
                 *  Camera Cam = Dono.GetComponent<AplicadorDeComandos>().MinhaCamera.GetComponent<Camera>();
                 *  if (Cam)
                 *      GetComponent<Canvas>().worldCamera = Cam;
                 * }*/

                // GetComponent<Canvas>().worldCamera = Camera.main;

                switch (tipo)
                {
                case TipoHud.criatures:
                    numeroDeElementos = dados.CriaturesAtivos.Count - 1;
                    break;

                case TipoHud.golpes:
                    numeroDeElementos = GameController.g.Manager.CriatureAtivo.MeuCriatureBase.GerenteDeGolpes.meusGolpes.Count;
                    break;

                case TipoHud.items:
                    numeroDeElementos = dados.Itens.Count;
                    break;
                }

                if (numeroDeElementos > 0)
                {
                    for (int i = 0; i < numeroDeElementos; i++)
                    {
                        AdicionaUmElementoNoContainer();
                    }
                }
                else if (numeroDeElementos == 0)
                {
                    umContainerDeItem.SetActive(false);
                }

                //numeroDeElementosAnterior = numeroDeElementos;

                layQ = new LayoutElementQuadrado(containerDosItens.gameObject);

                containerDosItens.anchoredPosition = new Vector2(0, containerDosItens.anchoredPosition.y);

                /*
                 * Não sei por que o Preinicio carregava com o Canvas.enabled == false
                 */
                GetComponent <Canvas>().enabled = true;
            }
        }
Example #16
0
    new void Start()
    {
        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            KeyVar keys = GameController.g.MyKeys;
            if (keys.VerificaAutoShift(KeyShift.conversouPrimeiroComIan) && !keys.VerificaAutoShift(KeyShift.venceuDerekPrimeiraVez))
            {
                npc = npcLuta;
            }

            base.Start();
        }
    }
Example #17
0
 // Use this for initialization
 void Start()
 {
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         cam = this;
         //basica.Start(transform);
         cDir = new CameraDirecionavel(new CaracteristicasDeCamera()
         {
             alvo        = GameController.g.Manager.transform,
             minhaCamera = transform
         });
     }
 }
    // Start is called before the first frame update
    void Start()
    {
        animador = GetComponent <Animator>();

        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            if (GameController.g.MyKeys.VerificaAutoShift(ID))
            {
                animador.SetTrigger("final");
                grade.SetActive(false);
            }
        }
    }
Example #19
0
 // Use this for initialization
 void Start()
 {
     if (Application.isPlaying)
     {
         if (ExistenciaDoController.AgendaExiste(Start, this))
         {
             if (GameController.g.MyKeys.VerificaAutoShift(ID))
             {
                 Destroy(gameObject);
             }
         }
     }
 }
Example #20
0
        // Use this for initialization
        void Start()
        {
            if (ExistenciaDoController.AgendaExiste(Start, this))
            {
                if (GameController.g.MyKeys.VerificaAutoShift(autoKey))
                {
                    tampa.Rotate(tampa.right, -70, Space.World);
                }

                textoDoBotao = BancoDeTextos.RetornaListaDeTextoDoIdioma(ChaveDeTexto.textoBaseDeAcao)[1];
                SempreEstaNoTrigger();
            }
        }
    // Use this for initialization
    void Start()
    {
        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            KeyVar keys = GameController.g.MyKeys;
            if (keys.VerificaAutoShift(KeyShift.fezPrimeiraFalaDeTuto))
            {
                transform.position = pos2.position;
            }

            if (keys.VerificaAutoShift(KeyShift.fezSegundaFalaDeTuto))
            {
                transform.position = pos3.position;
            }
        }
    }
Example #22
0
    // Start is called before the first frame update
    void Start()
    {
        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            EventAgregator.Publish(new StandardSendGameEvent(EventKey.destroyShiftCheck, ID, gameObject));
        }

        if (myCollider == null)
        {
            myCollider = GetComponent <TilemapCollider2D>();
        }

        if (myTile == null)
        {
            myTile = GetComponent <Tilemap>();
        }
    }
Example #23
0
        // Use this for initialization
        void Start()
        {
            if (ExistenciaDoController.AgendaExiste(Start, this))
            {
                comandR = GameController.g.CommandR;
                mov     = new MovimentacaoBasica(caracMov, elementos);
                //controle = FindObjectOfType<AndroidController>();
                if (Estado == EstadoDePersonagem.naoIniciado)
                {
                    dados.InicializadorDosDados();

                    if (CriatureAtivo == null)
                    {
                        SeletaDeCriatures();
                    }
                }
            }
        }
Example #24
0
 // Use this for initialization
 public void Start()
 {
     if (escondivel)
     {
         posInicial = escondivel.position;
         if (ExistenciaDoController.AgendaExiste(Start, Object.FindObjectOfType <MonoBehaviour>()))
         {
             if (GameController.g.MyKeys.VerificaAutoShift(chave))
             {
                 escondivel.gameObject.SetActive(false);
             }
         }
     }
     else
     {
         Debug.LogWarning("Escondivel não setado");
     }
 }
Example #25
0
 void Start()
 {
     yInicial = transform.position.y;
     if (ExistenciaDoController.AgendaExiste(Start, this))
     {
         if (GameController.g.MyKeys.VerificaAutoShift(Chave))
         {
             if (rockManager)
             {
                 rockManager.Realocar(this);
                 estado = RockMoveState.feito;
             }
             else
             {
                 Invoke("Start", 0.15f);
             }
         }
     }
 }
Example #26
0
    // Start is called before the first frame update
    void Start()
    {
        KeyVar kv = GameController.g.MyKeys;

        if (ExistenciaDoController.AgendaExiste(Start, this))
        {
            if (kv.VerificaEnemyShift(ID))
            {
                Desativar();
            }
            else
            {
                if (!kv.VerificaEnemyShift("limparContPentagono" + ID))
                {
                    kv.MudaAutoCont(ID, 0);
                }
            }
        }
    }
Example #27
0
    void ComunsCarregado()
    {
        if (ExistenciaDoController.AgendaExiste(ComunsCarregado, this))
        {
            SceneManager.sceneLoaded -= CarregouComuns;
            SceneManager.sceneLoaded += SetarCenaPrincipal;
            SceneManager.sceneLoaded += TatudoCarregado;

            if (SaveDatesManager.s.SavedGames.Count > indiceDoJogo)
            {
                S = SaveDatesManager.s.SavedGames[indiceDoJogo];
            }
            else
            {
                S = null;
            }

            if (S == null)
            {
                fase          = FasesDoLoad.carregando;
                aSerCarregado = 1;
                a2            = new AsyncOperation[1];
                a2[0]         = AditiveLoadScene(NomesCenas.TutoScene);
            }
            else
            {
                Debug.Log("contador do mapa: " + S.VariaveisChave.MapDates.Count);

                NomesCenas[] N2 = DescarregarCenasDesnecessarias(S.VariaveisChave.CenasAtivas.ToArray());

                numCarregador = 0;
                aSerCarregado = N2.Length;


                for (int i = 0; i < N2.Length; i++)
                {
                    SceneManager.UnloadSceneAsync(N2[i].ToString());
                }

                FuncaoCarregadora();
            }
        }
    }
Example #28
0
        void ComoPode()
        {
            if (ExistenciaDoController.AgendaExiste(ComoPode, this))
            {
                //Debug.Log(GameController.g+"  segunda vez");
                CharacterManager manager = GameController.g.Manager;
                manager.eLoad = true;
                AplicadorDeCamera.cam.transform.position = S.Posicao + new Vector3(0, 12, -10); //new Vector3(483, 12f, 745);
                manager.transform.position = S.Posicao;                                         //new Vector3(483,1.2f,755);
                manager.transform.rotation = S.Rotacao;
                manager.Dados = S.Dados;
                GameController.g.ReiniciarContadorDeEncontro();

                GameObject[] Gs = GameObject.FindGameObjectsWithTag("Criature");

                for (int i = 0; i < Gs.Length; i++)
                {
                    Destroy(Gs[i]);
                }

                // if (manager.CriatureAtivo != null)
                {
                    //   MonoBehaviour.Destroy(manager.CriatureAtivo.gameObject);
                    manager.InserirCriatureEmJogo();
                    manager.CriatureAtivo.transform.position = S.Posicao + new Vector3(0, 0, 1);//new Vector3(483, 1.2f, 756);
                }


                manager.Dados.ZeraUltimoUso();
                GameController.g.MyKeys = S.VariaveisChave;
                GameController.g.Salvador.SetarJogoAtual(indiceDoJogo);

                podeIr = true;

                StartCoroutine(Status());
            }
        }
Example #29
0
        void ComunsCarregado()
        {
            if (ExistenciaDoController.AgendaExiste(ComunsCarregado, this))
            {
                fase = FasesDoLoad.carregando;

                //S = new LoadAndSaveGame().Load(indiceDoJogo);

                if (SaveDatesForJolt.s.SavedGames.Count > indiceDoJogo)
                {
                    S = SaveDatesForJolt.s.SavedGames[indiceDoJogo];
                }
                else
                {
                    S = null;
                }

                if (S == null)
                {
                    a2    = new AsyncOperation[2];
                    a2[0] = SceneManager.LoadSceneAsync("cavernaIntro", LoadSceneMode.Additive);
                    a2[1] = SceneManager.LoadSceneAsync(NomesCenas.katidsVsTempleZone.ToString(), LoadSceneMode.Additive);
                }
                else
                {
                    a2 = new AsyncOperation[S.VariaveisChave.CenasAtivas.Count];
                    for (int i = 0; i < a2.Length; i++)
                    {
                        a2[i] = SceneManager.LoadSceneAsync(S.VariaveisChave.CenasAtivas[i].ToString(), LoadSceneMode.Additive);
                    }
                }
                Time.timeScale = 0;

                SceneManager.sceneLoaded -= CarregouComuns;
                SceneManager.sceneLoaded += SetarCenaPrincipal;
            }
        }