Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        RS       = GameObject.Find("RespawnObject").GetComponent <RespawnScript>();
        Stats    = GameObject.Find("TotalStatsHolder").GetComponent <EndGameStatsScript>();
        ES       = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
        WinText  = GameObject.Find("WinTextObj").GetComponent <Text>();
        WarBarP1 = GameObject.Find("KillBarP1").GetComponent <Image> ();
        WarBarP2 = GameObject.Find("KillBarP2").GetComponent <Image> ();
        WarBarP3 = GameObject.Find("KillBarP3").GetComponent <Image> ();
        WarBarP4 = GameObject.Find("KillBarP4").GetComponent <Image> ();

        WarBarP1.color = ES.GetColor(0);
        WarBarP2.color = ES.GetColor(1);
        WarBarP3.color = ES.GetColor(2);
        WarBarP4.color = ES.GetColor(3);

        WarBarP1.fillAmount = 0;
        WarBarP2.fillAmount = 0;
        WarBarP3.fillAmount = 0;
        WarBarP4.fillAmount = 0;
        P1Kills             = 0;
        P2Kills             = 0;
        P3Kills             = 0;
        P4Kills             = 0;

        KillsToWin      = ES.GetKillNumber();
        WinText.text    = "";
        WinText.enabled = false;

        // temporary dev tool
        KillsToWin = 10;
    }