Esempio n. 1
0
    public override void InitMission()
    {
        sceneInit = "QuartoKid";
        GameManager.initMission = true;
        GameManager.initX       = (float)3.0;
        GameManager.initY       = (float)0.2;
        GameManager.initDir     = 3;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = false;

        GameManager.instance.invertWorld        = false;
        GameManager.instance.invertWorldBlocked = false;

        if (!GameManager.instance.mission2ContestaMae)
        {
            em_kid1 = em_kid2 = true;
        }

        GameManager.instance.RandomObjectsPlaces(Inventory.InventoryItems.ISQUEIRO, new List <string> {
            "QuartoKid"
        });

        SetInitialSettings();
    }
Esempio n. 2
0
    public override void SetJardim()
    {
        if (GameManager.previousSceneName.Equals("GameOver"))
        {
            secao = enumMission.MAE_APARECE; // não chamar as definições do EspecificaEnum
        }

        GameManager.instance.scenerySounds.PlayBird(2);
        // LUZ DO AMBIENTE
        mainLight.transform.Rotate(new Vector3(-20, mainLight.transform.rotation.y, mainLight.transform.rotation.z));
        GameObject.Find("AreaLightHolder").gameObject.transform.Find("AreaLight").gameObject.SetActive(true); //utilizar AreaLight para cenas de dia, variar Z

        if (secao == enumMission.MAE_APARECE)
        {
            GameObject porta = GameObject.Find("DoorToLivingRoom").gameObject;
            porta.GetComponent <SceneDoor>().isOpened = false;

            GameObject trigger = GameManager.instance.AddObject("Scenery/AreaTrigger", "", new Vector3(1.3f, 0.4f, 1), new Vector3(1, 1, 1));
            trigger.name = "AreaTriggerCrow";
            trigger.GetComponent <Collider2D>().offset  = new Vector2(-4.4f, -2.1f);
            trigger.GetComponent <BoxCollider2D>().size = new Vector2(1.5f, 1.5f);

            GameManager.instance.invertWorldBlocked = false;

            GameManager.instance.rpgTalk.NewTalk("M3GardenSceneStart", "M3GardenSceneEnd");
        }

        GameObject triggerB = GameManager.instance.AddObject("Scenery/AreaTrigger", "", new Vector3(0f, 0f, 0), new Vector3(1, 1, 1));

        triggerB.name = "SpecialTrigger";
        triggerB.GetComponent <Collider2D>().offset  = new Vector2(6f, 3.15f);
        triggerB.GetComponent <BoxCollider2D>().size = new Vector2(1f, 1f);
    }
Esempio n. 3
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.INICIO)
        {
        }
    }
Esempio n. 4
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.FINAL)
        {
            GameManager.instance.ChangeMission(10);
        }
    }
Esempio n. 5
0
    public override void InitMission()
    {
        sceneInit = "QuartoKid";
        GameManager.initMission = true;
        GameManager.initX       = (float)1.5;
        GameManager.initY       = (float)-1.0;
        GameManager.initDir     = 1;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = true;

        GameManager.instance.InvertWorld(false);
        GameManager.instance.invertWorldBlocked = true;

        SetInitialSettings();
    }
Esempio n. 6
0
    public override void InitMission()
    {
        sceneInit = "Jardim";
        GameManager.initMission = true;
        GameManager.initX       = (float)3.5;
        GameManager.initY       = (float)1.7;
        //GameManager.initDir = 3;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = false;

        GameManager.instance.invertWorld        = true;
        GameManager.instance.invertWorldBlocked = false;

        SetInitialSettings();
    }
Esempio n. 7
0
    public override void InitMission()
    {
        sceneInit = "QuartoKid";
        GameManager.initMission = true;
        GameManager.initX       = (float)3.0;
        GameManager.initY       = (float)0.2;
        GameManager.initDir     = 3;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = false;

        GameManager.instance.invertWorld        = false;
        GameManager.instance.invertWorldBlocked = false;

        SetInitialSettings();

        camera = GameObject.Find("MainCamera").gameObject;
    }
Esempio n. 8
0
    public override void InitMission()
    {
        sceneInit = "QuartoKid";
        GameManager.initMission = true;
        GameManager.initX       = (float)-2.5;
        GameManager.initY       = (float)0.7;
        GameManager.initDir     = 0;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = true;

        GameManager.instance.InvertWorld(false);
        GameManager.instance.invertWorldBlocked = true;

        PlayerPrefs.DeleteKey("MO_Corredor_0X");
        PlayerPrefs.DeleteKey("MO_Corredor_0Y");

        SetInitialSettings();
    }
Esempio n. 9
0
    public override void InitMission()
    {
        sceneInit = "QuartoKid";
        GameManager.initMission = true;
        GameManager.initX       = (float)-2.5;
        GameManager.initY       = (float)0.7;
        GameManager.initDir     = 0;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = true;

        GameManager.instance.InvertWorld(false);
        GameManager.instance.invertWorldBlocked = false;

        SetInitialSettings();

        //if (Inventory.HasItemType(Inventory.InventoryItems.LIVRO)) Inventory.DeleteItem(Inventory.InventoryItems.LIVRO);

        racao = GameManager.instance.transform.Find("Racao").GetComponent <PlaceObject>();
    }
Esempio n. 10
0
    public override void InitMission()
    {
        sceneInit = "QuartoMae";
        GameManager.initMission = true;
        GameManager.initX       = (float)3;
        GameManager.initY       = (float)0.2;
        GameManager.initDir     = 3;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = false;

        GameManager.instance.invertWorld        = true;
        GameManager.instance.invertWorldBlocked = true;

        SetInitialSettings();

        fosforoMiniGame.posFlareX  = -1.37f;
        fosforoMiniGame.posFlareY  = 3.51f;
        isqueiroMiniGame.posFlareX = -1.37f;
        isqueiroMiniGame.posFlareY = 3.51f;
    }
Esempio n. 11
0
    // ANALISAR DIFICULDADE DO NIVEL E DOS DIFERENTES OBJETOS - FACA, PEDRO, FOSFORO, ISQUEIRO
    public override void InitMission()
    {
        sceneInit = "Porao";
        GameManager.initMission = true;
        GameManager.initX       = (float)1.5;
        GameManager.initY       = (float)0.2;
        GameManager.initDir     = 3;
        GameManager.LoadScene(sceneInit);
        secao            = enumMission.NIGHT;
        Book.bookBlocked = false;

        GameManager.instance.invertWorld        = false;
        GameManager.instance.invertWorldBlocked = false;

        SetInitialSettings();

        hasPanela = Inventory.HasItemType(Inventory.InventoryItems.TAMPA);
        if (GameManager.instance.pathCat >= GameManager.instance.pathBird)
        {
            endCat = true;
        }
    }
Esempio n. 12
0
    public override void InitMission()
    {
        sceneInit = "Jardim";
        GameManager.initMission = true;
        GameManager.initX       = (float)1.54;
        GameManager.initY       = (float)1.75;
        GameManager.initDir     = 2;
        GameManager.LoadScene(sceneInit);
        secao = enumMission.NIGHT;
        if (Cat.instance != null)
        {
            Cat.instance.DestroyCat();
        }
        if (Crow.instance != null)
        {
            Crow.instance.DestroyRaven();
        }
        if (GameManager.instance.pathCat >= GameManager.instance.pathBird)
        {
            endCat = true;
        }

        Book.bookBlocked = true;

        GameManager.instance.invertWorld        = false;
        GameManager.instance.invertWorldBlocked = false;

        if (GameManager.instance.rpgTalk.isPlaying)
        {
            GameManager.instance.rpgTalk.EndTalk();
        }

        player = GameManager.instance.gameObject;

        GameObject.Find("HUDCanvas").transform.Find("SelectedObject").gameObject.SetActive(false);
        GameObject.Find("HUDCanvas").transform.Find("BoxInventory").gameObject.SetActive(false);
    }
Esempio n. 13
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.INICIO)
        {
            GameManager.instance.rpgTalk.NewTalk("M5KidRoomSceneStart", "M5KidRoomSceneEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.OPENED)
        {
            ExtrasManager.canActivateSide1 = true;
            ExtrasManager.SideQuestsManager();
        }
        else if (secao == enumMission.CLOSED)
        {
            GameManager.instance.rpgTalk.NewTalk("M5KidRoomSceneSideStart", "M5KidRoomSceneSideEnd");
        }
        else if (secao == enumMission.INSIDE)
        {
            GameManager.instance.rpgTalk.NewTalk("M5Side1Start", "M5Side1End", false);
        }
        else if (secao == enumMission.FINISHED)
        {
            GameManager.instance.scenerySounds.PlayBird(1);
            //GameManager.instance.rpgTalk.NewTalk("M5KidRoomSceneRepeat", "M5KidRoomSceneRepeatEnd");
        }
        else if (secao == enumMission.END_ATTACK)
        {
            GameManager.instance.blocked = true;
            minionEmitter.StopAllMinions();
            GameObject.Find("MainCamera").GetComponent <Camera>().orthographicSize   = 6;
            GameObject.Find("MainCamera").GetComponent <Camera>().transform.position = new Vector3(0f, 0f, -20f);
            mom = GameManager.instance.AddObject("NPCs/mom", "", new Vector3(2.65f, 2.5f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            GameManager.instance.rpgTalk.NewTalk("M5HelpMomStart", "M5HelpMomEnd");
        }
        else if (secao == enumMission.ALMOST_ATTACK)
        {
            GameManager.instance.rpgTalk.NewTalk("M5HelpMom2Start", "M5HelpMom2End");
        }
        else if (secao == enumMission.ATTACK_MOM)
        {
            //final ruim
            minionEmitter.MoveAllMinionsAround(mom.transform.position);
        }
        else if (secao == enumMission.ATTACK_MOM2)
        {
            Cat.instance.GetComponent <Cat>().Patrol();
            Vector3   aux    = mom.transform.position;
            Vector3[] catPos = { aux };
            Cat.instance.targets        = catPos;
            Cat.instance.destroyEndPath = false;

            GameManager.instance.Invoke("InvokeMission", 8f);
        }
        else if (secao == enumMission.ATTACK_CAT)
        {
            //final bom
            minionEmitter.MoveAllMinionsAround(player.transform.position);
        }
        else if (secao == enumMission.ATTACK_CAT2)
        {
            GameManager.instance.Invoke("InvokeMission", 2f);
            // tela piscando
            Cat.instance.GetComponent <Cat>().Patrol();
            Vector3   aux    = player.transform.position;
            Vector3[] catPos = { aux };
            Cat.instance.targets        = catPos;
            Cat.instance.destroyEndPath = false;
        }
        else if (secao == enumMission.FINAL)
        {
            //GameManager.instance.ChangeMission(7);
            GameManager.LoadScene("Credits");
        }
    }
Esempio n. 14
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.INICIO)
        {
            GameManager.instance.rpgTalk.NewTalk("M6MomRoomSceneStart", "M6MomRoomSceneEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.LIGOULANTERNA)
        {
            GameManager.instance.rpgTalk.NewTalk("M6AfterFlashlight", "M6AfterFlashlightEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.DESLIGOULANTERNA)
        {
            GameManager.instance.rpgTalk.NewTalk("M6AfterFlashlightShutdown", "M6AfterFlashlightShutdownEnd", GameManager.instance.rpgTalk.txtToParse);
            GameObject portaCorredor = GameObject.Find("DoorToAlley").gameObject;
            portaCorredor.GetComponent <SceneDoor>().isOpened = true;
        }
        else if (secao == enumMission.SALA)
        {
            GameManager.instance.rpgTalk.NewTalk("M6LivingroomSceneStart", "M6LivingroomSceneEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.DICA)
        {
            GameManager.instance.rpgTalk.NewTalk("M6LivingroomTipStart", "M6LivingroomTipEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.GATOCOMFOLHA)
        {
            GameManager.instance.scenerySounds.PlayCat(3);
            GameManager.instance.rpgTalk.NewTalk("M6GardenSceneStart", "M6GardenSceneEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.TENTAOUTRAARVORE)
        {
            GameManager.instance.rpgTalk.NewTalk("M6IncorrectTree", "M6IncorrectTreeEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.TENTOUARVORECERTA)
        {
            if (Inventory.HasItemType(Inventory.InventoryItems.FOSFORO) || Inventory.HasItemType(Inventory.InventoryItems.ISQUEIRO))
            {
                EspecificaEnum((int)enumMission.TEMTUDO);
            }
            else
            {
                EspecificaEnum((int)enumMission.NAOTEMTUDO);
            }
        }
        else if (secao == enumMission.TEMTUDO)
        {
            GameManager.instance.rpgTalk.NewTalk("M6HasEverything", "M6HasEverythingEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.NAOTEMTUDO)
        {
            GameManager.instance.rpgTalk.NewTalk("M6HasntEverything", "M6HasntEverythingEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.FOGO)
        {
            GameManager.instance.rpgTalk.NewTalk("M6FireTree", "M6FireTreeEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.CHECOUMAE)
        {
            GameManager.instance.invertWorldBlocked = false;
            GameManager.instance.rpgTalk.NewTalk("M6BeforeFinal", "M6BeforeFinalEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.FINAL)
        {
            GameManager.instance.rpgTalk.NewTalk("M6Final", "M6FinalEnd", GameManager.instance.rpgTalk.txtToParse);
        }
    }
Esempio n. 15
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);
        if (secao == enumMission.SALA)
        {
            GameManager.LoadScene("Sala");
        }
        else if (secao == enumMission.CORREDOR)
        {
            GameManager.LoadScene("Corredor");
        }
        else if (secao == enumMission.QUARTO_MAE)
        {
            GameManager.LoadScene("QuartoMae");
        }
        else if (secao == enumMission.COZINHA)
        {
            GameManager.LoadScene("Cozinha");
        }
        else if (secao == enumMission.QUARTO_KID)
        {
            GameManager.LoadScene("QuartoKid");
        }
        else if (secao == enumMission.QUARTO_KID_CORVO)
        {
            GameManager.instance.InvertWorld(true);
            if (endCat)
            {
                GameObject crow = GameManager.instance.AddObject("NPCs/Crow", "", new Vector3(0f, 0f, -0.5f), new Vector3(4.5f, 4.5f, 1));
                crow.GetComponent <SpriteRenderer>().color = Color.gray;
            }
            else
            {
                GameObject crow = GameManager.instance.AddObject("NPCs/Crow", "", new Vector3(0f, 0f, -0.5f), new Vector3(5f, 5f, 1));
                crow.GetComponent <SpriteRenderer>().color = Color.gray;
            }

            GameObject.Find("AreaLightHolder").gameObject.transform.Find("AreaLight").gameObject.SetActive(false);

            GameManager.instance.Invoke("InvokeMission", 8f);
        }
        else if (secao == enumMission.QUARTO_KID_CORVO_ATACA)
        {
            GameManager.instance.scenerySounds.StopSound();
            GameObject emitter = Crow.instance.transform.Find("BirdEmitterCollider").gameObject;
            Crow.instance.timeBirdsFollow   = 0f;
            emitter.transform.localRotation = Quaternion.Euler(new Vector3(0, 0, 0));
            var emAux = emitter.GetComponent <ParticleSystem>();
            var main  = emAux.main;
            emitter.GetComponent <ParticleSystemRenderer>().sortingOrder = 2;
            emAux.emission.SetBurst(0, new ParticleSystem.Burst(0, 30, 30, 0, 10));
            main.maxParticles = 30;
            emitter.SetActive(true);

            //se quiser deixar os corvos mais rápidos
            float hSliderValue = 3.0F;
            main.simulationSpeed = hSliderValue;
            main.startSpeed      = hSliderValue;

            //mudanças de tamanho
            main.startSize = 1.5F;
            GameManager.instance.Invoke("InvokeMission", 5f);
        }
        else if (secao == enumMission.FINAL)
        {
            // FIM DO JOGO XD
            GameManager.LoadScene("MainMenu");
        }
    }
Esempio n. 16
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.INICIO)
        {
            GameManager.instance.rpgTalk.NewTalk("M3KidRoomSceneStart", "M3KidRoomSceneEnd", GameManager.instance.rpgTalk.txtToParse);

            Cat.instance.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(1.8f, 0.8f, -0.5f);
            Vector3[] catPos = { aux };
            Cat.instance.targets        = catPos;
            Cat.instance.speed          = 1.2f;
            Cat.instance.destroyEndPath = true;
        }
        else if (secao == enumMission.GATO_CORREDOR)
        {
            GameObject cat = GameManager.instance.AddObject("NPCs/catFollower", "", new Vector3(8.2f, -0.2f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            cat.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(1f, -0.1f, -0.5f);
            Vector3[] catPos = { aux };
            cat.GetComponent <Cat>().targets        = catPos;
            cat.GetComponent <Cat>().speed          = 1.6f;
            cat.GetComponent <Cat>().stopEndPath    = true;
            cat.GetComponent <Cat>().destroyEndPath = false;
        }
        else if (secao == enumMission.MI_DESBLOQUEADO)
        {
            GameManager.instance.AddObject("Tutorial/E-key");
            GameManager.instance.rpgTalk.NewTalk("M3Painting", "M3PaintingEnd");
            GameManager.instance.invertWorldBlocked = false;

            // Porta Mae
            GameObject portaMae         = GameObject.Find("DoorToMomRoom").gameObject;
            float      portaMaeDefaultY = portaMae.transform.position.y;
            float      posX             = portaMae.GetComponent <SpriteRenderer>().bounds.size.x / 5;
            portaMae.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/door-closed");
            portaMae.GetComponent <SceneDoor>().isOpened    = false;
            portaMae.transform.position = new Vector3(portaMae.transform.position.x - posX, portaMaeDefaultY, portaMae.transform.position.z);

            // Porta Kid
            GameObject portaKid         = GameObject.Find("DoorToKidRoom").gameObject;
            float      portaKidDefaultY = portaKid.transform.position.y;
            float      posXKid          = portaKid.GetComponent <SpriteRenderer>().bounds.size.x / 5;
            portaKid.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/door-closed");
            portaKid.GetComponent <SceneDoor>().isOpened    = false;
            portaKid.transform.position = new Vector3(portaKid.transform.position.x - posXKid, portaKidDefaultY, portaKid.transform.position.z);

            // Porta Cozinha
            GameObject portaCozinha = GameObject.Find("DoorToKitchen").gameObject;
            portaCozinha.GetComponent <SceneDoor>().isOpened = false;

            // Porta Sala
            GameObject portaSala = GameObject.Find("DoorToLivingRoom").gameObject;
            portaSala.GetComponent <SceneDoor>().isOpened = false;
        }
        else if (secao == enumMission.MI_ATIVADO)
        {
            GameObject.Find("MainCamera").GetComponent <Camera>().orthographicSize = 4;

            // Objetos do mundo invertido
            // Livro
            livro = GameManager.instance.AddObject("Objects/FixedObject", "", new Vector3(6.8f, 0.68f, -0.5f), new Vector3(0.5f, 0.5f, 1));
            livro.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/livro");
            livro.GetComponent <SpriteRenderer>().color  = Color.black;
            livro.AddComponent <Light>();
            livroAtivado = true;

            // Gato Sombra
            // VER MAIS CAMINHOS, COMO UMA HISTORIA
            Cat.instance.GetComponent <Cat>().GetComponent <SpriteRenderer>().gameObject.SetActive(false);
            catShadow = GameManager.instance.AddObject("NPCs/catShadow", "", new Vector3(8.2f, -0.2f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            catShadow.GetComponent <Patroller>().isPatroller = true;
            Vector3   aux    = new Vector3(6.8f, -0.2f, -0.5f);
            Vector3[] catPos = { aux };
            catShadow.GetComponent <Patroller>().targets     = catPos;
            catShadow.GetComponent <Patroller>().speed       = 0.9f;
            catShadow.GetComponent <Patroller>().stopEndPath = true;

            // Pessoa 1
            person1 = GameManager.instance.AddObject("NPCs/personShadow", "", new Vector3(10f, 0f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            person1.GetComponent <Patroller>().isPatroller = true;
            Vector3   auxP1 = new Vector3(7.3f, 0f, -0.5f);
            Vector3[] p1Pos = { auxP1 };
            person1.GetComponent <Patroller>().targets     = p1Pos;
            person1.GetComponent <Patroller>().speed       = 0.9f;
            person1.GetComponent <Patroller>().stopEndPath = true;

            // Pessoa 2
            person2 = GameManager.instance.AddObject("NPCs/personShadow", "", new Vector3(-1f, 0f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            person2.GetComponent <Patroller>().isPatroller = true;
            Vector3   auxP2 = new Vector3(6.5f, 0f, -0.5f);
            Vector3[] p2Pos = { auxP2 };
            person2.GetComponent <Patroller>().targets     = p2Pos;
            person2.GetComponent <Patroller>().speed       = 0.9f;
            person2.GetComponent <Patroller>().stopEndPath = true;

            GameManager.instance.rpgTalk.NewTalk("M3MundoInvertido", "M3MundoInvertidoEnd");
        }
        else if (secao == enumMission.CORVO_APARECE)
        {
            GameManager.instance.InvertWorld(true);
            GameManager.instance.invertWorldBlocked = true;

            GameManager.instance.scenerySounds.PlayBat(1);
            GameManager.instance.scenerySounds.PlayDemon(4);
            GameManager.instance.Invoke("InvokeMission", 3f);
        }
        else if (secao == enumMission.CORVO_ATACA)
        {
            GameManager.instance.rpgTalk.NewTalk("M3MundoInvertido2", "M3MundoInvertido2End", GameManager.instance.rpgTalk.txtToParse, false);

            // Porta Sala
            GameObject portaSala = GameObject.Find("DoorToLivingRoom").gameObject;
            portaSala.GetComponent <SceneDoor>().isOpened = true;

            GameObject.Find("BirdEmitterHolder(Corredor)").gameObject.transform.Find("BirdEmitterCollider").gameObject.SetActive(true);
            GameManager.instance.AddObject("Effects/PaperEmitter", "", new Vector3(6.8f, 0.68f, -0.5f), new Vector3(1, 1, 1));
        }
        else if (secao == enumMission.MI_TRAVADO)
        {
            if (GameManager.instance.rpgTalk.isPlaying)
            {
                GameManager.instance.rpgTalk.EndTalk();
            }

            GameManager.instance.InvertWorld(false);
            GameManager.instance.Invoke("InvokeMission", 5f);
        }
        else if (secao == enumMission.MAE_APARECE)
        {
            GameManager.instance.scenerySounds.PlayDemon(6);

            GameManager.instance.rpgTalk.NewTalk("M3VoltaMundoInvertido", "M3VoltaMundoInvertidoEnd");

            GameManager.instance.AddObject("NPCs/mom", "", new Vector3(-3.1f, 1f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            camera.GetComponent <Camera>().orthographicSize = 4;

            GameObject portaG = GameObject.Find("DoorToGarden").gameObject;
            portaG.GetComponent <SceneDoor>().isOpened = true;
        }
        else if (secao == enumMission.PASSAROS_FINAL)
        {
            camera.GetComponent <Camera>().orthographicSize = 4;

            GameManager.instance.invertWorldBlocked = true;
            // Gato Sombra
            catShadow = GameManager.instance.AddObject("NPCs/catShadow", "", new Vector3(-6f, -2.1f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            catShadow.GetComponent <Patroller>().isPatroller = true;
            Vector3   aux    = new Vector3(-4.3f, -4.5f, -0.5f);
            Vector3[] catPos = { aux };
            catShadow.GetComponent <Patroller>().targets     = catPos;
            catShadow.GetComponent <Patroller>().speed       = 0.9f;
            catShadow.GetComponent <Patroller>().stopEndPath = true;

            // Pessoa 1
            person1 = GameManager.instance.AddObject("NPCs/personShadow", "", new Vector3(-5.5f, -2.5f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            person1.GetComponent <Patroller>().isPatroller = true;
            Vector3   auxP1 = new Vector3(-4.8f, -4f, -0.5f);
            Vector3[] p1Pos = { auxP1 };
            person1.GetComponent <Patroller>().targets     = p1Pos;
            person1.GetComponent <Patroller>().speed       = 0.9f;
            person1.GetComponent <Patroller>().stopEndPath = true;

            GameManager.instance.rpgTalk.NewTalk("M3GardenSceneRepeat", "M3GardenSceneRepeatEnd");
        }
        else if (secao == enumMission.FINAL)
        {
            GameObject porta = GameObject.Find("DoorToLivingRoom").gameObject;
            porta.GetComponent <SceneDoor>().isOpened = true;

            GameObject.Find("BirdEmitterHolder(Jardim)").gameObject.transform.Find("BirdEmitterCollider").gameObject.SetActive(true);
            // Gato Sombra
            catShadow.GetComponent <Patroller>().isPatroller = true;
            Vector3   aux    = new Vector3(3f, 2.5f, -0.5f);
            Vector3[] catPos = { aux };
            catShadow.GetComponent <Patroller>().targets        = catPos;
            catShadow.GetComponent <Patroller>().speed          = 1.2f;
            catShadow.GetComponent <Patroller>().destroyEndPath = true;

            // Pessoa 1
            person1.GetComponent <Patroller>().isPatroller = true;
            Vector3   auxP1 = new Vector3(3f, 2.3f, -0.5f);
            Vector3[] p1Pos = { auxP1 };
            person1.GetComponent <Patroller>().targets        = p1Pos;
            person1.GetComponent <Patroller>().speed          = 1.4f;
            person1.GetComponent <Patroller>().destroyEndPath = true;
            GameManager.instance.rpgTalk.NewTalk("M3GardenSceneRepeat2", "M3GardenSceneRepeat2End");
        }
    }
Esempio n. 17
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);
        if (secao == enumMission.INICIO)
        {
            GameManager.instance.rpgTalk.NewTalk("M4KidRoomSceneStart", "M4KidRoomSceneEnd", GameManager.instance.rpgTalk.txtToParse);

            GameManager.instance.scenerySounds.PlayCat(3);
            GameObject cat = GameManager.instance.AddObject("NPCs/catFollower", "", new Vector3(-1f, 0.5f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            cat.GetComponent <Cat>().followWhenClose = false;
            cat.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(1.8f, 0.8f, -0.5f);
            Vector3[] catPos = { aux };
            cat.GetComponent <Cat>().targets        = catPos;
            cat.GetComponent <Cat>().speed          = 0.3f;
            cat.GetComponent <Cat>().destroyEndPath = true;
        }
        else if (secao == enumMission.GATO_ACELERA)
        {
            Cat.instance.speed = 1.2f;
        }
        else if (secao == enumMission.GATO_CORREDOR)
        {
            GameManager.instance.scenerySounds.PlayCat(2);

            GameObject trigger = GameManager.instance.AddObject("Scenery/AreaTrigger", "", new Vector3(6.5f, -0.1f, 1), new Vector3(1, 2, 1));
            trigger.GetComponent <Collider2D>().offset  = new Vector2(0, 0);
            trigger.GetComponent <BoxCollider2D>().size = new Vector2(1f, 1f);

            GameObject cat = GameManager.instance.AddObject("NPCs/catFollower", "", new Vector3(10f, -0.6f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            cat.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(7f, -0.2f, -0.5f);
            Vector3[] catPos = { aux };
            cat.GetComponent <Cat>().targets     = catPos;
            cat.GetComponent <Cat>().speed       = 1.6f;
            cat.GetComponent <Cat>().stopEndPath = true;
        }
        else if (secao == enumMission.FRENTE_CRIADO)
        {
            GameManager.instance.rpgTalk.NewTalk("frenteCriadoStart", "frenteCriadoEnd");
            Cat.instance.followWhenClose = true;
            Cat.instance.FollowPlayer();
        }
        else if (secao == enumMission.ARMARIO)
        {
            GameManager.instance.rpgTalk.NewTalk("M4MomRoomSceneStart", "M4MomRoomSceneEnd");
        }
        else if (secao == enumMission.GRANDE_BARULHO)
        {
            GameManager.instance.rpgTalk.NewTalk("GrandeBarulhoStart", "GrandeBarulhoEnd");
        }
        else if (secao == enumMission.VASO_GATO)
        {
            pote.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/pote-racao");

            GameManager.instance.scenerySounds.PlayCat(4);
            Cat.instance.followWhenClose = false;
            Cat.instance.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(-3f, 1.5f, -0.5f);
            Vector3[] catPos = { aux };
            Cat.instance.targets        = catPos;
            Cat.instance.speed          = 1.6f;
            Cat.instance.destroyEndPath = true;

            GameManager.instance.rpgTalk.NewTalk("OQ", "OQEnd", GameManager.instance.rpgTalk.txtToParse, false);
        }
        else if (secao == enumMission.VASO_SOZINHO)
        {
            vaso.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/vasoPlanta_quebrado");

            GameManager.instance.rpgTalk.NewTalk("OQ", "OQEnd", GameManager.instance.rpgTalk.txtToParse, false);
        }
        else if (secao == enumMission.QUEBRADO)
        {
            GameManager.instance.rpgTalk.NewTalk("M4Vase", "M4VaseEnd", GameManager.instance.rpgTalk.txtToParse, false);
            AbrirPorta();
            SetMae();
        }
        else if (secao == enumMission.POP_UP)
        {
            //Book.AddPage(); // livro encontrado

            if (GameManager.instance.pathCat >= GameManager.instance.pathBird)
            {
                EspecificaEnum((int)enumMission.MAE_CHEGA_CORREDOR);
            }
            else
            {
                EspecificaEnum((int)enumMission.MAE_CHEGA_QUARTO);
            }
        }
        else if (secao == enumMission.MAE_CHEGA_CORREDOR)
        {
            GameManager.instance.scenerySounds.PlayCat(1);
            GameManager.instance.rpgTalk.NewTalk("M4MaeChegouCorredor", "M4MaeChegouCorredorEnd", GameManager.instance.rpgTalk.txtToParse, false);
        }
        else if (secao == enumMission.MAE_CHEGA_QUARTO)
        {
            GameManager.instance.rpgTalk.NewTalk("M4MaeChegou", "M4MaeChegouEnd", GameManager.instance.rpgTalk.txtToParse, false);
            GameManager.instance.AddObject("NPCs/mom", "", new Vector3(-4f, 0f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            GameObject trigger = GameManager.instance.AddObject("Scenery/AreaTrigger", "", new Vector3(-4f, 0f, 1), new Vector3(2, 2, 1));
            trigger.name = "MaeTrigger";
            trigger.GetComponent <Collider2D>().offset  = new Vector2(0, 0);
            trigger.GetComponent <BoxCollider2D>().size = new Vector2(2f, 2f);
        }
        else if (secao == enumMission.FINAL)
        {
            GameManager.instance.Invoke("InvokeMission", 2f);
        }
    }
Esempio n. 18
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.ENCONTRA_MAE)
        {
            GameManager.instance.rpgTalk.NewTalk("M2CorridorSceneStart", "M2CorridorSceneEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.RESPEITA_MAE)
        {
            GameManager.instance.mission2ContestaMae = false;
        }
        else if (secao == enumMission.CONTESTA_MAE)
        {
            GameManager.instance.mission2ContestaMae = true;
        }
        else if (secao == enumMission.RESPEITA_MAE2)
        {
            GameManager.instance.rpgTalk.NewTalk("M2Q1C1_2", "M2Q1C1_2End", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.CONTESTA_MAE2)
        {
            GameManager.instance.rpgTalk.NewTalk("M2Q1C0_2", "M2Q1C0_2End", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.FINAL_RESPEITA)
        {
            GameManager.instance.rpgTalk.NewTalk("M2AllObjectsRespeita", "M2AllObjectsRespeitaEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.FINAL_RESPEITA_VELA)
        {
            velaFixa = GameManager.instance.AddObject("Objects/EmptyObject", "", new Vector3(0.125f, -1.1f, 0), new Vector3(2.5f, 2.5f, 1));
            velaFixa.GetComponent <SpriteRenderer>().sprite       = Resources.Load <Sprite>("Sprites/Objects/Inventory/vela");
            velaFixa.GetComponent <SpriteRenderer>().sortingOrder = 140;

            GameObject.Find("Player").gameObject.transform.Find("Fosforo").gameObject.GetComponent <MiniGameObject>().posFlareX = 0.125f;
            GameObject.Find("Player").gameObject.transform.Find("Fosforo").gameObject.GetComponent <MiniGameObject>().posFlareY = -1.05f;
        }
        else if (secao == enumMission.FINAL_RESPEITA_FOSFORO)
        {
            velaFixa.SetActive(false);
            // Vela
            velaFixa = GameObject.Find("velaMesa").gameObject;
            velaFixa.transform.GetChild(0).gameObject.SetActive(true);
            velaFixa.transform.GetChild(1).gameObject.SetActive(true);
            velaFixa.transform.GetChild(1).GetComponent <SpriteRenderer>().sortingOrder = 140;
            GameManager.instance.Invoke("InvokeMission", 4f);
        }
        else if (secao == enumMission.FINAL_CONTESTA)
        {
            GameManager.instance.rpgTalk.NewTalk("M2AllObjectsContesta", "M2AllObjectsContestaEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.FINAL_CONTESTA_CORVO)
        {
            GameManager.instance.scenerySounds.PlayBird(1);
            //crowBabies.GetComponent<CrowBabies>().FollowPlayer();
            crowBabies.transform.Find("BirdEmitterCollider").gameObject.SetActive(true);
            GameManager.instance.Invoke("InvokeMission", 40f);
        }
        else if (secao == enumMission.FINAL_CONTESTA_GATO)
        {
            crowBabies.transform.Find("BirdEmitterCollider").gameObject.SetActive(false);
            crowBabies.GetComponent <CrowBabies>().Stop();

            Cat.instance.followWhenClose = false;
            Cat.instance.stopEndPath     = true;
            Cat.instance.GetComponent <Cat>().Patrol();

            Vector3   target1 = crowBabies.transform.position;
            Vector3   target2 = new Vector3(-2f, 0.6f, -0.5f);
            Vector3[] targets = { target1, target2 };
            Cat.instance.targets = targets;

            crowBabies.GetComponent <CrowBabies>().Patrol();
            Vector3[] targetsCorvo = { target2 };
            crowBabies.GetComponent <CrowBabies>().targets = targetsCorvo;
            crowBabies.GetComponent <CrowBabies>().speed   = 0.6f;

            GameManager.instance.rpgTalk.NewTalk("M2AtaqueContesta", "M2AtaqueContestaEnd", GameManager.instance.rpgTalk.txtToParse);

            GameManager.instance.Invoke("InvokeMission", 2.5f);
        }
        else if (secao == enumMission.FINAL_CONTESTA_ATAQUE)
        {
            GameManager.instance.AddObject("Scenery/Garra", "", new Vector3(-1.48f, 1.81f, 0), new Vector3(0.1f, 0.1f, 1));
            crowBabies.GetComponent <CrowBabies>().DestroyCorvBabies();
            Cat.instance.Stop();
            GameManager.instance.Invoke("InvokeMission", 6f);
        }
        else if (secao == enumMission.FINAL)
        {
            GameManager.instance.ChangeMission(3);
        }
    }
Esempio n. 19
0
    public override void SetQuartoKid()
    {
        if (GameManager.previousSceneName.Equals("GameOver"))
        {
            GameObject cat = GameManager.instance.AddObject(
                "NPCs/catFollower", "", new Vector3(player.transform.position.x + 0.6f, player.transform.position.y, 0), new Vector3(0.15f, 0.15f, 1));
            cat.GetComponent <Cat>().FollowPlayer();
        }

        if (GameManager.previousSceneName.Equals("GameOver") &&
            (secao == enumMission.FINAL_CONTESTA_CORVO || secao == enumMission.FINAL_CONTESTA_GATO))
        {
            secao = enumMission.FINAL_CONTESTA; // está fora do EspecificaEnum pq não é para chamar a fala de lá e aí ficava mais fácil
        }

        if ((secao == enumMission.NIGHT && !GameManager.instance.mission1AssustaGato) || secao == enumMission.INICIO_GATO)
        {
            GameObject cat = GameManager.instance.AddObject("NPCs/catFollower", "", new Vector3(2.5f, -0.8f, 0), new Vector3(0.15f, 0.15f, 1));
            cat.GetComponent <Cat>().FollowPlayer();
        }
        else if (secao == enumMission.RESPEITA_MAE)
        {
            EspecificaEnum((int)enumMission.RESPEITA_MAE2);
        }
        else if (secao == enumMission.CONTESTA_MAE)
        {
            EspecificaEnum((int)enumMission.CONTESTA_MAE2);
        }
        else if (secao == enumMission.RESPEITA_MAE2)
        {
            GameObject windowTrigger = GameObject.Find("WindowTrigger").gameObject;
            windowTrigger.tag = "WindowTrigger";
            WindowTrigger trigger = windowTrigger.GetComponent <WindowTrigger>();
            trigger.enabled = true;
            SceneObject sceneObject = windowTrigger.GetComponent <SceneObject>();
            sceneObject.enabled = false;

            if (!Inventory.HasItemType(Inventory.InventoryItems.VELA))
            {
                GameManager.instance.rpgTalk.NewTalk("M2KidRoomSceneVela", "M2KidRoomSceneVelaEnd", GameManager.instance.rpgTalk.txtToParse);
            }
            else if (!Inventory.HasItemType(Inventory.InventoryItems.FOSFORO))
            {
                GameManager.instance.rpgTalk.NewTalk("M2KidRoomSceneFosforo", "M2KidRoomSceneFosforoEnd", GameManager.instance.rpgTalk.txtToParse);
            }
        }
        else if (secao == enumMission.CONTESTA_MAE2)
        {
            if (!Inventory.HasItemType(Inventory.InventoryItems.FACA))
            {
                GameManager.instance.rpgTalk.NewTalk("M2KidRoomSceneFaca", "M2KidRoomSceneFacaEnd", GameManager.instance.rpgTalk.txtToParse);
            }
            else if (!Inventory.HasItemType(Inventory.InventoryItems.TAMPA))
            {
                GameManager.instance.rpgTalk.NewTalk("M2KidRoomSceneTampa", "M2KidRoomSceneTampaEnd", GameManager.instance.rpgTalk.txtToParse);
            }
        }
        else if (secao == enumMission.FINAL_RESPEITA || secao == enumMission.FINAL_CONTESTA)
        {
            GameObject porta         = GameObject.Find("DoorToAlley").gameObject;
            float      portaDefaultY = porta.transform.position.y;
            float      posX          = porta.GetComponent <SpriteRenderer>().bounds.size.x / 5;
            porta.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/door-closed");
            porta.GetComponent <SceneDoor>().isOpened    = false;
            porta.transform.position = new Vector3(porta.transform.position.x - posX, portaDefaultY, porta.transform.position.z);

            if (secao == enumMission.FINAL_RESPEITA)
            {
                // Mini-game vela
                vela = player.transform.Find("Vela").gameObject;
                GameObject trigger = GameManager.instance.AddObject("Scenery/AreaTrigger", "", new Vector3(0.125f, -1.38f, 0), new Vector3(1, 1, 1));
                trigger.name = "VelaTrigger";
                trigger.GetComponent <Collider2D>().offset  = new Vector2(0, 0);
                trigger.GetComponent <BoxCollider2D>().size = new Vector2(1.8f, 1f);

                GameManager.instance.rpgTalk.NewTalk("M2KidRoomSceneRepeat", "M2KidRoomSceneRepeatEnd", GameManager.instance.rpgTalk.txtToParse);
            }
            else if (secao == enumMission.FINAL_CONTESTA)
            {
                // Crow atacando
                GameManager.instance.Print("CORVO");
                crowBabies = GameManager.instance.AddObject("NPCs/CrowBabies", "", new Vector3(-1.97f, 1.42f, -0.5f), new Vector3(3f, 3f, 1));
                crowBabies.GetComponent <CrowBabies>().speed           = 0.1f;
                crowBabies.GetComponent <CrowBabies>().timeBirdsFollow = 0.5f;
                var main = crowBabies.transform.Find("BirdEmitterCollider").gameObject.GetComponent <ParticleSystem>().main;
                main.startSpeed = 1.5f;

                GameManager.instance.Invoke("InvokeMission", 5f);
            }
        }
    }
Esempio n. 20
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.timer = 0;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.INICIO)
        {
            GameManager.instance.timer = 0;
            GameManager.instance.rpgTalk.NewTalk("M1KidRoomSceneStart", "M1KidRoomSceneEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.GATO_QUARTO)
        {
            // Porta abrindo
            GameManager.instance.scenerySounds2.PlayDoorOpen(2);
            GameObject porta = GameObject.Find("DoorToAlley").gameObject;
            porta.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/door-opened");
            porta.GetComponent <SceneDoor>().isOpened    = true;
            porta.transform.position = new Vector3(portaDefaultX, portaDefaultY, porta.transform.position.z);

            GameManager.instance.rpgTalk.NewTalk("M1KidRoomSceneCat", "M1KidRoomSceneCatEnd", GameManager.instance.rpgTalk.txtToParse);

            // Gato entrando
            GameManager.instance.scenerySounds.PlayCat(2);
            GameObject cat = GameManager.instance.AddObject("NPCs/catFollower", "", new Vector3(1.8f, 1f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            cat.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(1f, 0f, -0.5f);
            Vector3[] catPos = { aux };
            cat.GetComponent <Cat>().targets        = catPos;
            cat.GetComponent <Cat>().stopEndPath    = true;
            cat.GetComponent <Cat>().destroyEndPath = false;
        }
        else if (secao == enumMission.GATO_APARECEU)
        {
            GameManager.instance.scenerySounds.PlayCat(2);
            Cat.instance.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(1.8f, 1f, -0.5f);
            Vector3[] catPos = { aux };
            Cat.instance.targets        = catPos;
            Cat.instance.destroyEndPath = true;
        }
        else if (secao == enumMission.GATO_CORREDOR)
        {
            Cat.instance.GetComponent <Cat>().Patrol();
            Vector3   aux    = new Vector3(2.6f, -0.7f, -0.5f);
            Vector3[] catPos = { aux };
            Cat.instance.GetComponent <Cat>().targets = catPos;
            Cat.instance.destroyEndPath = false;
            Cat.instance.stopEndPath    = true;
            Cat.instance.speed          = 1.4f;
            GameManager.instance.Invoke("InvokeMission", 6.5f);
            GameManager.instance.pausedObject = true;
        }
        else if (secao == enumMission.CORVO_VISTO)
        {
            GameManager.instance.scenerySounds.PlayBird(1);
            GameManager.instance.blocked = true;

            //GameObject.Find("AreaLightHolder").gameObject.transform.Find("AreaLightTV").gameObject.SetActive(true);
            mainLight.transform.Rotate(new Vector3(-25, mainLight.transform.rotation.y, mainLight.transform.rotation.z));
            GameManager.instance.AddObject("Effects/BlinkMainLight", "", new Vector3(0f, 0f, 0f), new Vector3(1f, 1f, 1f));
            GameObject.Find("TV").gameObject.GetComponent <SceneMultipleObject>().ChangeSprite();
            GameManager.instance.Invoke("InvokeMission", 5f);
        }
        else if (secao == enumMission.SMILE)
        {
            GameManager.instance.scenerySounds.PlayScare(3);

            GameObject darkness = GameObject.Find("DarknessHolder").gameObject;
            darkness.transform.Find("Darkness").gameObject.SetActive(true);
            GameManager.instance.Invoke("InvokeMission", 3f);
        }
        else if (secao == enumMission.MAE_QUARTO)
        {
            GameManager.LoadScene("QuartoKid");
        }
        else if (secao == enumMission.FAZER_ESCOLHA)
        {
            GameObject.Destroy(GameObject.Find("mom(Clone)").gameObject);
            GameManager.instance.Invoke("InvokeMission", 4f);
        }
    }
Esempio n. 21
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.INICIO)
        {
            GameManager.instance.rpgTalk.NewTalk("M7GardenSceneStart", "M7GardenSceneEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.FINAL)
        {
            GameManager.instance.ChangeMission(8);
        }
        else if (secao == enumMission.PISTA_JARDIM)
        {
            GameManager.instance.InvertWorld(false);
            GameManager.instance.rpgTalk.NewTalk("M7GardenShadowSceneStart", "M7GardenShadowSceneEnd", GameManager.instance.rpgTalk.txtToParse);
            // Pessoa 1
            person1 = GameManager.instance.AddObject("NPCs/personShadow", "", new Vector3(-6f, 4f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            person1.GetComponent <Patroller>().isPatroller = true;
            Vector3   auxP1 = new Vector3(-6f, -2.5f, -0.5f);
            Vector3   auxP2 = new Vector3(-5f, -2.4f, -0.5f);
            Vector3   auxP3 = new Vector3(-7f, -2.6f, -0.5f);
            Vector3   auxP4 = new Vector3(-7f, -2.5f, -0.5f);
            Vector3[] p1Pos = { auxP1, auxP2, auxP3, auxP4 };
            person1.GetComponent <Patroller>().targets     = p1Pos;
            person1.GetComponent <Patroller>().speed       = 0.9f;
            person1.GetComponent <Patroller>().stopEndPath = true;

            // Pessoa 2
            person2 = GameManager.instance.AddObject("NPCs/personShadow", "", new Vector3(0f, -3.5f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            person2.GetComponent <Patroller>().isPatroller = true;
            Vector3   aux2P1 = new Vector3(-3f, -3f, -0.5f);
            Vector3   aux2P2 = new Vector3(-4f, -3f, -0.5f);
            Vector3   aux2P3 = new Vector3(-5f, -2.5f, -0.5f);
            Vector3   aux2P4 = new Vector3(-5f, -3f, -0.5f);
            Vector3[] p2Pos  = { aux2P1, aux2P2, aux2P3, aux2P4 };
            person2.GetComponent <Patroller>().targets     = p2Pos;
            person2.GetComponent <Patroller>().speed       = 0.6f;
            person2.GetComponent <Patroller>().stopEndPath = true;
        }
        else if (secao == enumMission.PISTA_BANHEIRO)
        {
            GameManager.instance.InvertWorld(false);
            GameManager.instance.rpgTalk.NewTalk("M7BathroomShadowSceneStart", "M7BathroomShadowSceneEnd", GameManager.instance.rpgTalk.txtToParse);
            // Pessoa 1
            person1 = GameManager.instance.AddObject("NPCs/personShadow", "", new Vector3(2f, 0.5f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            person1.GetComponent <Patroller>().isPatroller = true;
            Vector3   auxP1 = new Vector3(2f, 0f, -0.5f);
            Vector3   auxP2 = new Vector3(-2f, 0f, -0.5f);
            Vector3   auxP3 = new Vector3(2f, 0f, -0.5f);
            Vector3   auxP4 = new Vector3(-2f, 0f, -0.5f);
            Vector3[] p1Pos = { auxP1, auxP2, auxP3, auxP4 };
            person1.GetComponent <Patroller>().targets     = p1Pos;
            person1.GetComponent <Patroller>().speed       = 0.9f;
            person1.GetComponent <Patroller>().stopEndPath = true;

            // Gato Sombra
            catShadow = GameManager.instance.AddObject("NPCs/catShadow", "", new Vector3(2f, 0.5f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            catShadow.GetComponent <Patroller>().isPatroller = true;
            Vector3   aux    = new Vector3(2f, -1f, -0.5f);
            Vector3   aux1   = new Vector3(1f, -1f, -0.5f);
            Vector3[] catPos = { aux, aux1 };
            catShadow.GetComponent <Patroller>().targets     = catPos;
            catShadow.GetComponent <Patroller>().speed       = 0.3f;
            catShadow.GetComponent <Patroller>().stopEndPath = true;
        }
        else if (secao == enumMission.PISTA_QUARTO_MAE)
        {
            GameManager.instance.InvertWorld(false);
            GameManager.instance.rpgTalk.NewTalk("M7MomRoomShadowSceneStart", "M7MomRoomShadowSceneEnd", GameManager.instance.rpgTalk.txtToParse);
            // Pessoa 1
            person1 = GameManager.instance.AddObject("NPCs/personShadow", "", new Vector3(2f, 0.5f, -0.5f), new Vector3(0.3f, 0.3f, 1));
            person1.GetComponent <Patroller>().isPatroller = true;
            Vector3   auxP1 = new Vector3(2f, 1.5f, -0.5f);
            Vector3   auxP2 = new Vector3(2f, -0.5f, -0.5f);
            Vector3   auxP3 = new Vector3(4f, -0.5f, -0.5f);
            Vector3   auxP4 = new Vector3(2f, -0.5f, -0.5f);
            Vector3[] p1Pos = { auxP1, auxP2, auxP3, auxP4 };
            person1.GetComponent <Patroller>().targets     = p1Pos;
            person1.GetComponent <Patroller>().speed       = 0.9f;
            person1.GetComponent <Patroller>().stopEndPath = true;

            // Gato Sombra
            catShadow = GameManager.instance.AddObject("NPCs/catShadow", "", new Vector3(-4f, 0f, -0.5f), new Vector3(0.15f, 0.15f, 1));
            catShadow.GetComponent <Patroller>().isPatroller = true;
            Vector3   aux    = new Vector3(5f, -1f, -0.5f);
            Vector3[] catPos = { aux };
            catShadow.GetComponent <Patroller>().targets     = catPos;
            catShadow.GetComponent <Patroller>().speed       = 0.6f;
            catShadow.GetComponent <Patroller>().stopEndPath = true;
        }
        else if (secao == enumMission.HOW)
        {
            GameManager.instance.rpgTalk.NewTalk("M7HowStart", "M7HowEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.DEFAULT)
        {
            GameManager.instance.InvertWorld(true);
        }
        else if (secao == enumMission.ACUSA_GATO)
        {
            //GameManager.instance.rpgTalk.NewTalk("M7AcusaStart", "M7AcusaEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.PERGUNTA_GATO)
        {
            // GameManager.instance.rpgTalk.NewTalk("M7PerguntaStart", "M7PerguntaEnd", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.PERGUNTA1)
        {
            //GameManager.instance.rpgTalk.NewTalk("M7Pergunta1Start", "M7Pergunta1End", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.PERGUNTA10)
        {
            // GameManager.instance.rpgTalk.NewTalk("M7Pergunta10Start", "M7Pergunta10End", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.PERGUNTA2)
        {
            // GameManager.instance.rpgTalk.NewTalk("M7Pergunta2Start", "M7Pergunta2End", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.PERGUNTA20)
        {
            // GameManager.instance.rpgTalk.NewTalk("M7Pergunta20Start", "M7Pergunta20End", GameManager.instance.rpgTalk.txtToParse);
        }
        else if (secao == enumMission.FINE)
        {
            // GameManager.instance.rpgTalk.NewTalk("M7FineStart", "M7FineEnd", GameManager.instance.rpgTalk.txtToParse);
        }
    }
Esempio n. 22
0
    public override void EspecificaEnum(int pos)
    {
        secao = (enumMission)pos;
        GameManager.instance.Print("SECAO: " + secao);

        if (secao == enumMission.INICIO)
        {
            GameManager.instance.rpgTalk.NewTalk("M8KidRoomSceneStart", "M8KidRoomSceneEnd", GameManager.instance.rpgTalk.txtToParse, GameManager.instance, "", false);
        }
        else if (secao == enumMission.CORVO_APARECE_CAT)
        {
            GameManager.instance.rpgTalk.NewTalk("Dica8PC", "Dica8PCEnd", GameManager.instance.rpgTalk.txtToParse, GameManager.instance, "", false);

            CreateCorvoCat();

            GameObject porta = GameObject.Find("DoorToAlley").gameObject;
            porta.GetComponent <SceneDoor>().isOpened = false;
        }
        else if (secao == enumMission.CORVO_APARECE_BIRD)
        {
            GameManager.instance.rpgTalk.NewTalk("Dica8PB", "Dica8PBEnd", GameManager.instance.rpgTalk.txtToParse, GameManager.instance, "", false);

            CreateCorvoBird();

            GameObject porta = GameObject.Find("DoorToAlley").gameObject;
            porta.GetComponent <SceneDoor>().isOpened = false;
        }
        else if (secao == enumMission.CORVO_ATACA_CAT_INIT || secao == enumMission.CORVO_ATACA_BIRD_INIT)
        {
            GameObject porta = GameObject.Find("DoorToAlley").gameObject;
            porta.GetComponent <SceneDoor>().isOpened = true;
            GameManager.instance.scenerySounds2.PlayDoorOpen(1);
            porta.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Sprites/Objects/Scene/door-opened");
            porta.transform.position = new Vector3(portaDefaultX, portaDefaultY, porta.transform.position.z);

            GameManager.instance.Invoke("InvokeMission", 3f);
        }
        else if (secao == enumMission.CORVO_ATACA_CAT || secao == enumMission.CORVO_ATACA_BIRD)
        {
            if (Crow.instance != null)
            {
                Crow.instance.transform.Find("BirdEmitterCollider").gameObject.SetActive(true);
                Crow.instance.FollowPlayer();
            }
        }
        else if (secao == enumMission.MAE_CAT)
        {
            GameManager.instance.rpgTalk.NewTalk("M8MomCat", "M8MomCatEnd", GameManager.instance.rpgTalk.txtToParse, GameManager.instance, "", false);

            GameManager.instance.AddObject("NPCs/mom", "", new Vector3(-3.1f, 1.3f, -0.5f), new Vector3(0.3f, 0.3f, 1));
        }
        else if (secao == enumMission.FINAL_CAT)
        {
            Crow.instance.Stop();
            Crow.instance.transform.Find("BirdEmitterCollider").gameObject.SetActive(false);

            GameManager.instance.rpgTalk.NewTalk("M8LivingroomSceneRepeat", "M8LivingroomSceneRepeatEnd", false);
        }
        else if (secao == enumMission.BOTIJAO_BIRD)
        {
            GameManager.instance.rpgTalk.NewTalk("M8KitchenSceneRepeat", "M8KitchenSceneRepeatEnd", false);
        }
        else if (secao == enumMission.FINAL_BIRD)
        {
            fireEvent.SetActive(true);
            Crow.instance.Stop();
            Crow.instance.transform.Find("BirdEmitterCollider").gameObject.SetActive(false);
            GameManager.instance.blocked = true;
            GameManager.instance.Invoke("InvokeMission", 5f);
        }
        else if (secao == enumMission.FINAL)
        {
            if (Cat.instance != null)
            {
                Cat.instance.DestroyCat();
            }
            GameManager.instance.ChangeMission(9);
        }
    }