void Start()
    {
        healthLevel           = GameObject.Find("PowerCellTotalPower").GetComponent <PowerCellStats>();
        health                = 100;
        disrupted             = false;
        powerCore             = GameObject.Find("PowerCore");
        disruptableComponents = GetComponentsInChildren <Renderer> ();

        //defaultColor = powerCore.GetComponent<GameObject>().GetComponent<Renderer>().material.color;
        disruptColor = Color.black;

        disruptParticles = GameObject.Find("DisruptParticles");
        disruptParticles.SetActive(false);
        LoseCheck = GameObject.Find("WinLoseGameCanvas").GetComponent <WinLoseGameState> ();
    }
Esempio n. 2
0
    void Start()
    {
        checkWin   = GameObject.FindObjectOfType <WinLoseGameState>();
        tower      = GameObject.FindObjectOfType <PowerTower>();
        powercheck = GameObject.FindObjectOfType <PowerCellStats>();

        TextA  = GameObject.Find("GoalsTextA").GetComponent <Text>();
        TextB  = GameObject.Find("GoalsTextB").GetComponent <Text>();
        TextC  = GameObject.Find("GoalsTextC").GetComponent <Text>();
        TextC1 = GameObject.Find("GoalsTextC1").GetComponent <Text>();
        TextC2 = GameObject.Find("GoalsTextC2").GetComponent <Text>();
        TextC3 = GameObject.Find("GoalsTextC3").GetComponent <Text>();

        greenValue = GameObject.Find("TurretActiveTimeGreen").GetComponent <ChargeLevels>();
        redValue   = GameObject.Find("TurretActiveTimeRed").GetComponent <ChargeLevels>();
        blueValue  = GameObject.Find("TurretActiveTimeBlue").GetComponent <ChargeLevels>();
    }