コード例 #1
0
        protected void ChangeElevatorTexture(Texture newTex)
        {
            meshRenderer.GetPropertyBlock(MatProp);

            MatProp.SetTexture("_MainTex", newTex);

            meshRenderer.SetPropertyBlock(MatProp);
        }
コード例 #2
0
        public void ChangeTex(Texture tex)
        {
            meshRenderer.GetPropertyBlock(MatProp);

            MatProp.SetTexture("_MainTex", tex);

            meshRenderer.SetPropertyBlock(MatProp);
        }
コード例 #3
0
        void ChangeTexture(int actualTimerValue)
        {
            switch (actualTimerValue)
            {
            case 9:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex9;
                break;

            case 8:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex8;
                break;

            case 7:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex7;
                break;

            case 6:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex6;
                break;

            case 5:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex5;
                break;

            case 4:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex4;
                break;

            case 3:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex3;
                break;

            case 2:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex2;
                break;

            case 1:
                _MainTex = _MaterialCentral.instance.actualPack._CounterTex1;
                break;
            }

            meshRenderer.GetPropertyBlock(MatProp);

            MatProp.SetTexture("_MainTex", _MainTex);

            meshRenderer.SetPropertyBlock(MatProp);
        }