Example #1
0
    public void Teleport()
    {
        if (canTeleport | NextIndex == 4)
        {
            if (NextIndex != 0)
            {
                roomManager.Activate(NextIndex);
            }
            _player.transform.position = _exitPoint.position;
            canTeleport = false;
        }
        else
        {
            switch (NextIndex)
            {
            case 2:
                DialogueController.DialogueShow("The door is locked. Find the key under the blue flag", null);
                break;

            case 3:
                DialogueController.DialogueShow("To go further, you need to kill all the bugs!", null);
                break;
            }
        }
    }
Example #2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Monster")
        {
            DestroyFireBall();
        }

        if (other.tag == "Girl")
        {
            DialogueController.DialogueShow("OH, NOOOOO!!", null);
            GameObject.FindGameObjectWithTag("4").GetComponent <RoomController>().DoSomothing1();
            Destroy(other.gameObject);
            DestroyFireBall();
            FinishController.Show();
        }
    }
Example #3
0
 void Start()
 {
     DialogueController.DialogueShow("Finally you got here. Come to me faster, honey!", null);
 }
Example #4
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag("StartTrigger"))
        {
            MyDelegate method = new MyDelegate(CollidersController.OpenStartDoor);

            CollidersController.ShowError();
            DialogueController.DialogueShow(
                "Oh, honey, something wrong with me, wait a bit..." +
                "@I did something wrong. I don't know, but I'm out of control, hmm.." +
                "@#Oops, honey, please sorry, I didn't want to do it, find path to get here again!"
                + "@The door is locked!"
                + "@To go to the next floor, find the key near the blue flag", method);
        }

        if (collision.gameObject.CompareTag("Richag"))
        {
            collision.gameObject.GetComponent <Richag>().TurnRichag();
        }


        if (collision.gameObject.CompareTag("Door"))
        {
            collision.gameObject.GetComponent <DoorTransition>().Teleport();
        }

        if (collision.gameObject.CompareTag("3_1"))
        {
            Destroy(collision.gameObject);
            DialogueController.DialogueShow("Here you sould turn on the lever to lower the ladder.", null);
        }

        if (collision.gameObject.CompareTag("1_1"))
        {
            GameObject FBFlag = GameObject.Find("FakeBlueFlag");
            GameObject FRFlag = GameObject.Find("FakeRedFlag");

            FBFlag.SetActive(false);
            FRFlag.SetActive(false);



            Destroy(collision.gameObject);
            DialogueController.DialogueShow("I said near the BLUE flag!", null);
        }

        if (collision.gameObject.CompareTag("1_2"))
        {
            if (GameObject.Find("BlueFlag").active)
            {
                DoorTransition.canTeleport = true;
                Destroy(collision.gameObject);
                DialogueController.DialogueShow("Yes, honey, the door opened!", null);
            }
        }

        if (collision.gameObject.CompareTag("3_2"))
        {
            GameObject.FindGameObjectWithTag("Ladder").GetComponent <FalllDownItem>().Drop();
            MyDelegate method = new MyDelegate(GameObject.FindGameObjectWithTag("3").GetComponent <RoomController>().DoSomothing2);

            Destroy(collision.gameObject);
            DialogueController.DialogueShow(
                "Oops... Ok, I will try to help you" +
                "@Wait a second..." +
                "@#Now!" +
                " You should find another lever to fix the game!", method);
        }

        if (collision.gameObject.CompareTag("3_3"))
        {
            MyDelegate method = new MyDelegate(GameObject.FindGameObjectWithTag("3").GetComponent <RoomController>().DoSomothing1);
            Destroy(collision.gameObject);
            DialogueController.DialogueShow("Cool, #now....", method);
        }

        if (collision.gameObject.CompareTag("4_1"))
        {
            Destroy(collision.gameObject);
            DialogueController.DialogueShow(
                "@$You are finally back!!" +
                "@Why so long?.." +
                "@You should have been faster!" +
                "@Just don't touch me!", null);
        }
    }