Exemple #1
0
    void Start()
    {
        curCommand = commandObj.GetComponent <BlueCommand>();
        midSelect.SetActive(false);
        rightSelect.SetActive(false);
        winText.SetActive(false);
        randLeft   = Random.Range(1, 4);
        randMid    = Random.Range(1, 4);
        randRight  = Random.Range(1, 4);
        leftColor  = left.GetComponent <ColourBehaviour>();
        midColor   = mid.GetComponent <ColourBehaviour>();
        rightColor = right.GetComponent <ColourBehaviour>();

        switch (randLeft)
        {
        case 1:
            leftColorText.text = "Yellow";
            break;

        case 2:
            leftColorText.text = "Red";
            break;

        case 3:
            leftColorText.text = "Blue";
            break;
        }

        switch (randMid)
        {
        case 1:
            midColorText.text = "Yellow";
            break;

        case 2:
            midColorText.text = "Red";
            break;

        case 3:
            midColorText.text = "Blue";
            break;
        }

        switch (randRight)
        {
        case 1:
            rightColorText.text = "Yellow";
            break;

        case 2:
            rightColorText.text = "Red";
            break;

        case 3:
            rightColorText.text = "Blue";
            break;
        }
    }
Exemple #2
0
 void Update()
 {
     colorChange = light.GetComponent <ColourBehaviour>();
 }