Ejemplo n.º 1
0
    private void Awake()
    {
        //load all genes from resources
        m_ColorGene = Resources.Load <ColorScriptableObject>(GeneResourcePath + "Color");

        m_Genes.AddRange(Resources.LoadAll <GeneScriptableObject>(GeneResourcePath));

        FetchGeneTypes();

        PickGenes(m_GenesPerCharacter);

        FetchAndInitAliens();

        SetDominantGenesAvailableText(m_DominantGenesAvailable);

        m_VictoryUI = GameObject.FindGameObjectWithTag("VictoryUI").GetComponent <VictoryUI>();
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        m_VictoryUI = GameObject.FindGameObjectWithTag("VictoryUI").GetComponent <VictoryUI>();

        m_Toggle.isOn = IsSoundOn;
    }
Ejemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        TM.text       = "Time: " + Timer.TimeScoreHours + ":" + Timer.TimeScoreMin + ":" + Timer.TimeScoreSeconds.ToString("f2");
        score.text    = "Score: " + plr.score + "/50";
        victime.text  = "Time: " + Timer.TimeScoreHours + ":" + Timer.TimeScoreMin + ":" + Timer.TimeScoreSeconds.ToString("f2");
        vicscore.text = "Score: " + plr.score + "/50";
        GOTime.text   = "Time: " + Timer.TimeScoreHours + ":" + Timer.TimeScoreMin + ":" + Timer.TimeScoreSeconds.ToString("f2");
        GOScore.text  = "Score: " + plr.score + "/50";
        if (plr.canmov == true)
        {
            if (PUI.IsPaused == false)
            {
                Stamcharge = true;
            }
            else
            {
                Stamcharge = false;
            }
        }
        if (plr.score >= 30)
        {
            ScoreImg.material = stamon;
        }
        if (plr.score < 30)
        {
            ScoreImg.material = stamdown;
        }
        if (plr.KeyboardMode == true)
        {
            ContImg.material = stamdown;
        }
        else
        {
            ContImg.material = stamon;
        }
        if (Stamcharge == true)
        {
            if (plr.inbox == true)
            {
                stamina.SetActive(true);
                stamina.GetComponent <Image>().fillAmount = stamina.GetComponent <Image>().fillAmount - 0.008f;
            }
            if (plr.inbox == false)
            {
                stamina.GetComponent <Image>().fillAmount = stamina.GetComponent <Image>().fillAmount + 0.01f;
            }
        }


        if (stamina.GetComponent <Image>().fillAmount == 0)
        {
            staminaImg.material = stamdown;
            plr.anim.SetBool("On", false);
            plr.inbox  = false;
            plr.canbox = false;
        }
        if (stamina.GetComponent <Image>().fillAmount == 1)
        {
            staminaImg.material = stamon;
            plr.canbox          = true;
        }
        if (plr.GO == true)
        {
            GOUI.SetActive(true);
            if (Input.anyKey)
            {
                SceneManager.LoadScene("Main");
            }
        }
        else
        {
            GOUI.SetActive(false);
        }
        if (Vic.VictoryOn == true)
        {
            VictoryUI.SetActive(true);
            if (Input.anyKey)
            {
                SceneManager.LoadScene("Main");
            }
        }
        else
        {
            VictoryUI.SetActive(false);
        }
    }