Exemplo n.º 1
0
    IEnumerator welcomePanelDisable()
    {
        yield return(new WaitForSecondsRealtime(3f));

        welcomePanel.SetActive(false);
        Egypt.Play();
    }
Exemplo n.º 2
0
    private void Start()
    {
        welcomePhrase = "when the sun sets over the nile, mummies start to roam the land of the pyramids \n.......";
        Egypt         = this.GetComponent <AudioSource>();
        if (!GameManager.getIsCompleted())
        {
            GameManager.ReceiveSavedData();
            welcomePanel.SetActive(true);
            typing = welcomePanel.GetComponent <AudioSource>();
            StartCoroutine(showText(welcomePhrase, welcomeText, typing));
        }
        else
        {
            Egypt.Play();
        }
        GroupID = GameManager.getGroupID();
        GameManager.createGods();
        if (GroupID > 0)
        {
            myGod = GameManager.getGodInfo(GroupID);
        }
        revealPanel.SetActive(false);
        factionPanel.SetActive(false);
        nextPanel.SetActive(false);

        if (GameManager.getInitial() == 0)
        {
            factionButton.SetActive(false);
            infoButton.SetActive(false);
            IndexObject.SetActive(false);
        }
        else
        {
            factionButton.SetActive(true);
            infoButton.SetActive(true);
            IndexObject.SetActive(true);
            IndexObject.GetComponentInChildren <TextMeshProUGUI>().text = GameManager.getName(int.Parse(GameManager.getIndexNo())) + "\n" + GameManager.getIndexNo();
            if (GameManager.getGender(int.Parse(GameManager.getIndexNo())) == 'F')
            {
                profPic.sprite = FemaleProfPic;
            }
            else
            {
                profPic.sprite = MaleProfPic;
            }
            switch (GroupID)
            {
            case 1:
                godSprite = Horus;
                break;

            case 2:
                godSprite = Bastet;
                break;

            case 3:
                godSprite = Osiris;
                break;

            case 4:
                godSprite = Anubis;
                break;
            }
        }
    }