Example #1
0
    IEnumerator Mostrar_Falas()
    {
        List <string> aux;

        if (ExplorerManager.Get_Explorer_Manager().cleared_rooms.Count == 3)
        {
            aux = falasVitoria;
        }
        else if (PlayerItemManager.Get_Player_Item_Manager().trapCount == 0)
        {
            aux = falasSemTrap;
        }
        else
        {
            aux = falasIniciais;
        }

        foreach (string s in aux)
        {
            yield return(display_text(s));

            yield return(new WaitUntil(() => Input.GetKeyDown(KeyCode.E)));
        }

        dialogCanvas.SetActive(false);
        dialog_active = false;
    }
Example #2
0
    void OnTriggerEnter2D(Collider2D coll)
    {
        var target = coll.gameObject;

        if (coll.tag == "Player" && doorDirection != Direcao.NONE)
        {
            ExplorerManager.Get_Explorer_Manager().Change_Room(frontPosition.position, doorDirection);
        }
    }
Example #3
0
    public void Unserialize(RoomData room)
    {
        Unserialize_Wall_Tile_Data(wallsTop, room.wallsTop);
        Unserialize_Wall_Tile_Data(wallsBottom, room.wallsBottom);
        Unserialize_Wall_Tile_Data(wallsRight, room.wallsRight);
        Unserialize_Wall_Tile_Data(wallsLeft, room.wallsLeft);
        Unserialize_Wall_Tile_Data(wallsCorners, room.wallsCorners);

        ExplorerManager.Get_Explorer_Manager().dialogGirl.SetActive(room.name == "room_main");
    }
Example #4
0
    public IEnumerator Die()
    {
        sr.enabled = false;
        GameObject blood = Instantiate(bloodPrefab, this.transform.position, Quaternion.identity);

        blood.transform.rotation = Quaternion.Euler(0f, 0f, Random.Range(0f, 180f));
        yield return(particles.death_explosion());

        if (GameObject.FindGameObjectsWithTag("Enemy").Length == 1)
        {
            //last one to die
            ExplorerManager.Get_Explorer_Manager().Clear_Current_Room();
        }

        Destroy(this.gameObject);
    }