Exemplo n.º 1
0
    public void ChangeColor()
    {
        switch (switchColor)
        {
        case SwitchColor.Red:
            meshRenderer.material = switchMats[1];
            switchColor           = SwitchColor.Blue;
            break;

        case SwitchColor.Blue:
            meshRenderer.material = switchMats[0];
            switchColor           = SwitchColor.Red;
            break;
        }
    }
Exemplo n.º 2
0
    public void InstantiateSwitch(SwitchColor color)
    {
        switchColor = color;

        switch (switchColor)
        {
        case SwitchColor.Red:
            meshRenderer.material = switchMats[0];
            switchColor           = SwitchColor.Red;
            break;

        case SwitchColor.Blue:
            meshRenderer.material = switchMats[1];
            switchColor           = SwitchColor.Blue;
            break;
        }
    }
Exemplo n.º 3
0
 public void setObserver(SwitchColor sc)
 {
     observer = sc;
 }