Exemplo n.º 1
0
    public void SetColors()
    {
        //myGrip.GetComponent<Renderer>().material = colors[myGrip.GetCurPos()];
        //myBarrel.GetComponent<Renderer>().material = colors[myBarrel.GetCurPos()];
        //myAmmo.GetComponent<Renderer>().material = colors[myAmmo.GetCurPos()];
        //Slidertexts();

        if (myGrip.swiMod == null)
        {
            myGrip.swiMod = myGrip.GetComponent <SwitchModel>();
        }
        if (myBarrel.swiMod == null)
        {
            myBarrel.swiMod = myBarrel.GetComponent <SwitchModel>();
        }
        if (myAmmo.swiMod == null)
        {
            myAmmo.swiMod = myAmmo.GetComponent <SwitchModel>();
        }
        myGrip.SetModels();
        myGrip.swiMod.SetModel(myGrip.GetCurPos());
        myBarrel.SetModels();
        myBarrel.swiMod.SetModel(myBarrel.GetCurPos());
        myAmmo.SetModels();
        myAmmo.swiMod.SetModel(myAmmo.GetCurPos());
    }