Esempio n. 1
0
    public override void OnStart()
    {
        base.OnStart();
        buttonMesh  = gameObject.RequireComponent <CMeshRenderer>();
        buttonColor = buttonMesh.GetMaterial().GetColor();

        sound = gameObject.RequireComponent <CSound>();

        if (gameObject.GetName()[0] == 'r')
        {
            keyCode = 1;
        }
        else if (gameObject.GetName()[0] == 'g')
        {
            keyCode = 2;
        }
        else
        {
            keyCode = 3;
        }

        seqControllerObj = GameObject.GetGameObjectByName("SequenceScrambler");
        seqController    = GetScript <AccessSequenceControllerScript>(seqControllerObj);
        //buttonMesh.GetMaterial().SetColor(SharpMocha.CORNFLOWER_BLUE);
    }
    public override void OnStart()
    {
        base.OnStart();
        buttonMesh = gameObject.RequireComponent<CMeshRenderer>();
        buttonColor = buttonMesh.GetMaterial().GetColor();

        sound = gameObject.RequireComponent<CSound>();

        if (gameObject.GetName()[0] == 'r')
            keyCode = 1;
        else if (gameObject.GetName()[0] == 'g')
            keyCode = 2;
        else
            keyCode = 3;

        seqControllerObj = GameObject.GetGameObjectByName("SequenceScrambler");
        seqController = GetScript<AccessSequenceControllerScript>(seqControllerObj);
            //buttonMesh.GetMaterial().SetColor(SharpMocha.CORNFLOWER_BLUE);
    }