예제 #1
0
    IEnumerator HAIR_TORTOISE_DIALOGUES()
    {
        Hare.WalkWithTransform();
        Tortoise.WalkWithTransform();
        yield return(new WaitForSeconds(Tortoise.animationController.GetCurrentPlayingClipLength()));

        cameraController.ZoomIn();

        Giraafe.Talk();
        Giraafe.Order();
        yield return(new WaitForSeconds(Giraafe.animationController.GetCurrentPlayingClipLength()));

//		Giraafe.dialogController.ChangeText ("I thought we settled this one at the last Jungle Olympics");
        Giraafe.MoveLeft();
        Giraafe.Talk();
        Giraafe.dialogController.PopDialogue("أعتقد أننا سوينا هذه \nالقضية في دورة الألعاب \nالأولمبية الأخيرة في الغابة.");
//		Giraafe.TalkRight ();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //214

//		Giraafe.dialogController.ChangeText ("Didn’t Tortoise win the race between you two?");
        Giraafe.dialogController.ChangeText("ألم تفز السلحفاة \nبالسباق الذي تم بينكما؟");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //215

        Giraafe.MakeIdle();
        Giraafe.dialogController.UnPopDialogue();

        yield return(new WaitForSeconds(2f));

        MainUIManager.Instance.decisionUiController.PopDialogueIcon(GameObject.FindObjectOfType <JungleHubController>().HarePosition);
        yield return(new WaitForSeconds(0.35f));

        GameObject.FindGameObjectWithTag("Bubble").GetComponent <Image> ().color = new Color32(255, 255, 255, 255);
        yield return(new WaitUntil(() => (MainUIManager.Instance.decisionUiController.proceedStatus == true)));

        GameObject.FindGameObjectWithTag("Bubble").GetComponent <Image> ().color = new Color32(255, 255, 255, 0);
        MainUIManager.Instance.decisionUiController.UnPopDialogueIcon();

        cameraController.PanRight(0.25f);
//		Hare.dialogController.PopDialogue ("I challenge that victory, Judge!");
        Hare.dialogController.PopDialogue("أنا اعترض على هذا الفوز،\n حضرة القاضية!");
        Hare.Talk();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //216

        //		Hare.dialogController.ChangeText ("Ever since crossing the finish line this tortoise hasn’t moved an inch");//217
        Hare.dialogController.ChangeText("فمنذ عبور خط \nالنهاية لم تتحرك \nالسلحفاة شبراً واحداً.");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //217

//		Hare.dialogController.ChangeText ("He couldn’t possibly have beat me in a race!");
        Hare.dialogController.ChangeText("فلا يمكنه أن يفوز علي \nفي سباق");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //218

        Hare.dialogController.UnPopDialogue();
        Hare.MakeIdle();
        yield return(new WaitForSeconds(2f));

        MainUIManager.Instance.decisionUiController.PopDialogueIcon(GameObject.FindObjectOfType <JungleHubController>().TurtleBubblePOsition);
        yield return(new WaitForSeconds(0.35f));

        GameObject.FindGameObjectWithTag("Bubble").GetComponent <Image> ().color = new Color32(255, 255, 255, 255);
        yield return(new WaitUntil(() => (MainUIManager.Instance.decisionUiController.proceedStatus == true)));

        GameObject.FindGameObjectWithTag("Bubble").GetComponent <Image> ().color = new Color32(255, 255, 255, 0);
        MainUIManager.Instance.decisionUiController.UnPopDialogueIcon();

//		Tortoise.dialogController.PopDialogue ("I’ll tie your ears into a knot, Hare!");
        Giraafe.MoveRight();
        cameraController.PanLeft(0.25f);
        Tortoise.dialogController.PopDialogue("سأعقد أذنيك يا أرنب");
        Tortoise.Talk();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //219

//		Tortoise.dialogController.ChangeText ("I won fair and square.");
        Tortoise.dialogController.ChangeText("لقد فزت بنزاهة وجدارة");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //220

//		Tortoise.dialogController.ChangeText ("And I got the medal right here to prove it");
        Tortoise.dialogController.ChangeText("ولدي الميدالية هنا\n  لنثبت ذلك");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //221

        Tortoise.dialogController.ChangeText("سابقيني مجددًا\n وسوف ترين!");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //222

        Tortoise.dialogController.UnPopDialogue();
        Tortoise.MakeIdle();
        yield return(new WaitForSeconds(2f));

//		Hare.dialogController.PopDialogue ("Race me again and you’ll see!");
        cameraController.Normal();
        Giraafe.MoveLeft();
        Hare.dialogController.PopDialogue("حضرة القاضية، أطالب\n بإعادة المباراة\n ضد هذه المخادعة!");
        Hare.Talk();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //223

        Hare.dialogController.UnPopDialogue();
        Hare.MakeIdle();

        yield return(new WaitForSeconds(2f));

//		Giraafe.dialogController.PopDialogue ("This is court of law! ");
        Giraafe.Talk();
        Giraafe.Order();
        yield return(new WaitForSeconds(Giraafe.animationController.GetCurrentPlayingClipLength()));

        Giraafe.MoveRight();
        Giraafe.Talk();
        Giraafe.dialogController.PopDialogue("هذه قاعة محكمة!");
        //Giraafe.TalkRight ();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //224

//		Giraafe.dialogController.ChangeText ("There will be no demands or name-calling here!");
        Giraafe.dialogController.ChangeText("لا يُسمح \nفيها بإلقاء الشتائم ! ");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //225

//		Giraafe.dialogController.ChangeText ("Mr. Tortoise, do you accept Ms. Hare’s challenge to a rematch?");
        Giraafe.dialogController.ChangeText("أيتها السلحفاة، هل\n تقبلين تحدي السيد\n أرنب لإعادة السباق؟");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //226

        Giraafe.dialogController.UnPopDialogue();
        Giraafe.MakeIdle();

        yield return(new WaitForSeconds(2f));


//		Tortoise.dialogController.PopDialogue ("To race??");
        Tortoise.dialogController.PopDialogue("السباق؟");
        Tortoise.Talk();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //227

//		Tortoise.dialogController.ChangeText ("Never happening, Judge.");
        Tortoise.dialogController.ChangeText("لن يحدث، حضرة القاضية");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //228

//		Tortoise.dialogController.ChangeText ("But I’ll appoint a champion to represent me, If there is one in the crowd!");
        Tortoise.dialogController.ChangeText("ولكني سأختار بطلاً \nليمثلني من بين الجمهور!");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //229

        Tortoise.dialogController.UnPopDialogue();
        Tortoise.MakeIdle();


        yield return(new WaitForSeconds(1f));

//		Hare.dialogController.PopDialogue ("If that medal is on the line, I’m game for anything!");
        Hare.dialogController.PopDialogue("إذا كانت هذه الميدالية \nعلى المحك، فأنا \nأوافق على أي شيء!");
        Hare.Talk();
        Giraafe.MoveLeft();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //230

        Hare.dialogController.UnPopDialogue();
        Hare.MakeIdle();


        Giraafe.Talk();
//		Giraafe.dialogController.PopDialogue ("It seems we have a race on our hands.");
        Giraafe.dialogController.PopDialogue("يبدو ان لدينا سباق");

        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //231

//		Giraafe.dialogController.ChangeText ("Who is up to be Mr Tortoise's champion?");
        Giraafe.dialogController.ChangeText("من سيكون بطل السيدة\n سلحفاة؟");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //232

        Giraafe.dialogController.UnPopDialogue();
        Giraafe.MakeIdle();

        yield return(new WaitForSeconds(2f));

//		Player.dialogController.PopDialogue ("Shall we race with the Hare?");
        Player.dialogController.PopDialogue("هلا تسابقنا مع الأرنب؟");
        Player.StartTalking();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //233

        Player.dialogController.UnPopDialogue();
        Player.MakeIdle();

        yield return(new WaitForSeconds(1.5f));


        MainUIManager.Instance.decisionUiController.PopDicisionBox("YesNoSelection");
        //		MainUIManager.Instance.decisionUiController.PopDicisionBox ("نعم/لا");
        yield return(new WaitUntil(() => (MainUIManager.Instance.decisionUiController.proceedStatus == true)));

        yield return(new WaitForSeconds(1.5f));

        MainUIManager.Instance.decisionUiController.UnPopDecisionBox();

        PopulateJungleCourtQuest();
        yield return(new WaitForSeconds(1.6f));

        MainUIManager.Instance.hudController.gameObject.SetActive(false);

        MainUIManager.Instance.loadingUiController.ActivateHareRunQuest();
        AsyncOperation operation = Application.LoadLevelAsync("2dInfiniteRunner");

        yield return(new WaitUntil(() => (operation.isDone == true)));

        MainUIManager.Instance.loadingUiController.DeActivate();
        yield return(new WaitUntil(() => (GameManager.Instance.QuestInitialized == false)));

        MainUIManager.Instance.decisionUiController.UnPopDecisionBox();
        MainUIManager.Instance.loadingUiController.Activate();
        operation = Application.LoadLevelAsync("JungleCourt");
        yield return(new WaitUntil(() => (operation.isDone == true)));

        MainUIManager.Instance.loadingUiController.DeActivate();

        Player           = GameObject.FindObjectOfType <KatkootiController>();
        Tortoise         = GameObject.FindObjectOfType <TortoiseController>();
        Hare             = GameObject.FindObjectOfType <HareController>();
        Giraafe          = GameObject.FindObjectOfType <GiraafeController>();
        cameraController = Camera.main.gameObject.GetComponent <CameraController> ();
        MainUIManager.Instance.hudController.gameObject.SetActive(true);
        Player.transform.position   = GameObject.FindObjectOfType <JungleHubController> ().PlayerDefaultPos.transform.position;
        Tortoise.transform.position = GameObject.FindObjectOfType <JungleHubController> ().TurtleDefaultPos.transform.position;
        Hare.transform.position     = GameObject.FindObjectOfType <JungleHubController> ().HareDefaultPosition.transform.position;

        //	yield return new WaitForSeconds (1f);


        SoundManager.Instance.PlaySoundOneShot("WinningSound");
        yield return(new WaitForSeconds(4f));

        Player.Celebrations();
        SoundManager.Instance.PlaySoundOneShot("KKClap");
        Player.MakeIdle();


        yield return(new WaitForSeconds(2f));

//		Tortoise.dialogController.PopDialogue ("Was the Hare caught sleeping once again?");
        Tortoise.dialogController.PopDialogue("هل عُثر على الأرنب \nنائمًا مجددًا؟");
        Tortoise.Talk();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //239

        Tortoise.dialogController.UnPopDialogue();
        Tortoise.MakeIdle();

        yield return(new WaitForSeconds(1f));

        Player.dialogController.PopDialogue("هل يفعل ذلك كل مرة؟");
        Player.StartTalking();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //240

        Player.dialogController.ChangeText("ربما عليه أن يراجع طبيبًا");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //241

        Player.dialogController.UnPopDialogue();
        Player.MakeIdle();


        Giraafe.MoveLeft();
        Giraafe.Talk();
//		Giraafe.dialogController.PopDialogue ("I declare Tortoise's champion Katkooti the winner ");
        Giraafe.dialogController.PopDialogue("أعلن أن كتكوتي بطل \nالسلحفاة هو الفائز ");
        float temptime = SoundManager.Instance.PlayJungleCourtDialogue() / 2;

        yield return(new WaitForSeconds(temptime));        //242

        Giraafe.dialogController.ChangeText("وسأمنح هذه الميدالية \nللمتسابق الذي دار بشكل جيد!");
        yield return(new WaitForSeconds(temptime));

        Giraafe.dialogController.UnPopDialogue();
        Giraafe.MakeIdle();

        GameObject.FindObjectOfType <JungleHubController> ().JeenaMedal.SetActive(true);
        SoundManager.Instance.PlaySoundOneShot("MonkeyMedal");
        yield return(new WaitForSeconds(2f));

        GameObject.FindObjectOfType <JungleHubController> ().JeenaMedal.SetActive(false);


        MainUIManager.Instance.inventoryController.Activate();
        //MainUIManager.Instance.inventoryController.ResetInventory (3,3);
        yield return(new WaitForSeconds(1f));

        MainUIManager.Instance.inventoryController.PopulateAt(GameObject.FindObjectOfType <JungleHubController> ().JeenaMedalImage, 3);

        yield return(new WaitForSeconds(0.5f));


//		Hare.dialogController.PopDialogue ("You ran a good race but I won't go easy on you next time.");
        Hare.dialogController.PopDialogue("لقد جريت في السباق جيدًا \nولكنني لن أتساهل \nمعك في المرة القادمة");
        Hare.Talk();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayJungleCourtDialogue()));        //243

        Hare.dialogController.UnPopDialogue();
        Hare.MakeIdle();

        // Delete from here ...........................................
        SoundManager.Instance.InrementJungleCourtSound();
////		Hare.dialogController.ChangeText ("Come to me if you want to race again");
//		Hare.dialogController.ChangeText ("تعال الي إذا رغبت \nفي السباق مجددًا");
//		yield return new WaitForSeconds (SoundManager.Instance.PlayJungleCourtDialogue());//244
//		Hare.dialogController.UnPopDialogue ();
//		Hare.MakeIdle ();
//		yield return new WaitForSeconds (2f);
        //
        //		Player.dialogController.PopDialogue ("We have power left over, ");
        //		Player.StartTalking ();
        //		yield return new WaitForSeconds (2f);
        //		Player.dialogController.ChangeText ("why don’t we use it to make our home nicer?");
        //		yield return new WaitForSeconds (2f);
        //		Player.dialogController.ChangeText ("USE MY WORDSONG POWER TO Build new things in my home");
        //		yield return new WaitForSeconds (2f);
        //		Player.dialogController.UnPopDialogue ();
        //		Player.MakeIdle ();
        //		yield return new WaitForSeconds (2f);
        MainUIManager.Instance.hudController.gameObject.SetActive(true);
        MainUIManager.Instance.hudController.EnableUIMapGlow();


        PlayCurrentState();
        //MainUIManager.Instance.mapUIController.Activate ();
    }
예제 #2
0
    IEnumerator PLAYER_TAP_TO_BUILD_HOME()
    {
        //        Player.dialogController.PopDialogue ("Double Tap here to use the power to build my home");
        //        yield return new WaitForSeconds(2f);
        //        /*
        //yield return new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue());//33
        SoundManager.Instance.InrementTutorialSound();
        GameManager.Instance.getHabitat().exterior.ActivateLevel0Glow();
        MainUIManager.Instance.decisionUiController.PopTap(GameManager.Instance.getHabitat().exterior.chickHome);
        yield return(new WaitUntil(() => (MainUIManager.Instance.decisionUiController.proceedStatus == true)));

        Player.Celebrations();
        MainUIManager.Instance.decisionUiController.UnPopTap();
        SoundManager.Instance.PlaySoundOneShot("SongBarPowerDown");
        yield return(new WaitForSeconds(0.3f));

        //        */
        Player.MakeIdle();

        Player.animationController.PlayAnimation("ChickSong");
        //        Player.dialogController.UnPopDialogue ();
        MainUIManager.Instance.StartCoroutine(MainUIManager.Instance.hudController.StarEffect());
        GameManager.Instance.ChickSongPowerValue = 0;
        yield return(new WaitForSeconds(0.2f));


        ///MainUIManager.Instance.hudController.StartCoroutine (MainUIManager.Instance.hudController.FillChickSongBar);
        GameManager.Instance.InstantiateObject("ConstructionParticles", GameManager.Instance.getHabitat().HouseBuildEffect.transform.position);
        GameManager.Instance.EnableExterior();

        //GameManager.Instance.InstantiateObject ("ConstructionParticles", GameManager.Instance.getHabitat ().HouseBuildEffect.transform.position);
        yield return(new WaitForSeconds(0.3f));

        SoundManager.Instance.PlaySoundOneShot("KKClap");

        //yield return new WaitForSeconds (3f);
//		Player.dialogController.PopDialogue ("That was so much fun!....");

        Player.dialogController.PopDialogue("لقد كان ذلك ممتعًا لل غاية!...");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue()));       //34

        Player.StartTalking();
        Player.dialogController.UnPopDialogue();
//		Player.dialogController.ChangeText ("But my home doesn’t look quite finished yet");
        //	Player.dialogController.ChangeText ("ولكن يبدو أن بيتي لم ينته\n بناؤه بعد");
        yield return(new WaitForSeconds(1f));

        //Player.dialogController.ChangeText ("ولكن يبدو أن بيتي لم \n ينته بناؤه بعد.");
        Player.dialogController.PopDialogue("");
        yield return(new WaitForSeconds(0.15f));

        Player.dialogController.EnableTempDialogueImage();
        yield return(new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue()));       //35

        Player.dialogController.DisableTempDialogueImage();
//		Player.dialogController.ChangeText ("I think we need more wood");
        Player.dialogController.ChangeText("أعتقد أننا نحتاج مزيدًا من\n الأخشاب");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue()));       //36

        //        Maybe there is some way to recharge it so I can finish building my house
//		Player.dialogController.ChangeText ("My power seems to be finished also…");
        Player.dialogController.ChangeText("يبدو أن قوتي قد\n انتهت كذلك ...");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue()));       //37-1

//		Player.dialogController.ChangeText ("Maybe there is some way to recharge it so I can finish building my house");
        Player.dialogController.ChangeText("ربما توجد طريقة ما\n لإعادة شحنها\n لكي يمكنني إتمام بناء منزلي");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue()));       //37-2

        //        Player.dialogController.ChangeText ("Maybe there is some way to recharge it so I can finish building my house.");
        //        yield return new WaitForSeconds(3f);
        //
        //        Player.dialogController.ChangeText ("so I can finish building my house");
        //        yield return new WaitForSeconds(3f);
//		SoundManager.Instance.PlaySoundOneShot ("MagicalSwoosh");
//		Player.dialogController.ChangeText ("That storm sure brought a lot of magical things to this place");
        Player.dialogController.ChangeText("لابد أن هذه العاصفة أحضرت \nالكثير من الأشياء\n السحرية إلى هنا");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue()));       //38

        SoundManager.Instance.PlaySoundOneShot("Birds");
//		Player.dialogController.ChangeText ("I wonder what I can find deeper in the jungle!");
        Player.dialogController.ChangeText("أتساءل مالذي يمكنني أن أجده\nفي أعماق الغابة");
        yield return(new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue()));       //39

//		Player.dialogController.ChangeText ("Shall we go deeper into the jungle!");
        //	Player.dialogController.ChangeText ("هل ندخل إلى أعماق الغابة؟");


        Player.dialogController.UnPopDialogue();
        SoundManager.Instance.InrementTutorialSound();
        //	yield return new WaitForSeconds(SoundManager.Instance.PlayTutorialDialogue());//40
        MainUIManager.Instance.decisionUiController.PopDicisionBox("YesNoSelection");

//				MainUIManager.Instance.decisionUiController.PopDicisionBox ("نعم/ لا");
        yield return(new WaitUntil(() => MainUIManager.Instance.decisionUiController.proceedStatus == true));

        MainUIManager.Instance.decisionUiController.UnPopDecisionBox();

        //yield return new WaitForSeconds(3f);
        //yield return new WaitForSeconds(SoundManager.Instance.getSoundLengthByName("Dummy")-1f);
        Player.MakeIdle();
        PlayCurrentState();
    }