示例#1
0
 void IncrementPowerTimer()
 {
     if (myOrbSpawner != null)
     {
         myOrbSpawner.GetComponent <OrbSpawner> ().willSpawn = true;
         ChargeLevels powers = GameObject.Find("TurretActiveTime" + colorName).GetComponent <ChargeLevels>();
         if (colorName != null)
         {
             //PLAY AUDIO EFFECT UPON MATCH
             GetComponent <AudioSource>().PlayOneShot(match3SoundFX);
             float sliderValue = powers.sliderValue;
             powers.sliderValue += 5.0f;
         }
     }
 }
示例#2
0
    void Start()
    {
        dropTimer = GameManager.manager.dropTimer;
        for (int i = 0; i < Sides.Length; i++)
        {
            Sides[i] = new int[4];
        }

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

        LeftCommands  = Sides[LeftSide];
        RightCommands = Sides[RightSide];
    }
示例#3
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>();
    }