Exemplo n.º 1
0
 public void InitAtAwake()
 {
     E_ShaderData[] dataArray = new E_ShaderData[] { E_ShaderData.ColorBias, E_ShaderData.AvatarHelper };
     foreach (E_ShaderData data in dataArray)
     {
         this.ShaderDataList[(int)data] = Singleton <AuxObjectManager> .Instance.LoadAuxObjectProto(data.ToString()).GetComponent <MonoBuffShader_Base>();
     }
 }
Exemplo n.º 2
0
 public T GetBuffShaderData <T>(E_ShaderData buff) where T : MonoBuffShader_Base
 {
     if (this.ShaderDataList[(int)buff] == null)
     {
         this.ShaderDataList[(int)buff] = Singleton <AuxObjectManager> .Instance.LoadAuxObjectProto(buff.ToString()).GetComponent <MonoBuffShader_Base>();
     }
     return((T)this.ShaderDataList[(int)buff]);
 }
Exemplo n.º 3
0
 public LerpInstance(ShaderLerpPlugin plugin, BaseMonoAnimatorEntity entity, E_ShaderData dataType, List <BaseMonoAnimatorEntity.SpecialStateMaterialData> list, MonoBuffShader_Lerp shaderData, bool dir)
 {
     this._shaderLerpPlugin  = plugin;
     this._entity            = entity;
     this._dataType          = dataType;
     this._mats              = list;
     this._shaderData        = shaderData;
     this.isEnableTransition = dir;
 }
Exemplo n.º 4
0
        public void StartLerp(E_ShaderData dataType, List <BaseMonoAnimatorEntity.SpecialStateMaterialData> list, MonoBuffShader_Lerp shaderData, bool dir, int shaderIx)
        {
            LerpInstance item = new LerpInstance(this, this._animatorEntity, dataType, list, shaderData, dir);

            if (shaderIx != -1)
            {
                int num = this._newShaderEntries.SeekAddPosition <Tuple <E_ShaderData, int> >();
                this._newShaderEntries[num] = Tuple.Create <E_ShaderData, int>(dataType, shaderIx);
            }
            this._lerpInstances.Add(item);
            item.StartLerping();
        }
Exemplo n.º 5
0
 public int PopFirstNewShaderEntryByShaderDataType(E_ShaderData dataType)
 {
     for (int i = 0; i < this._newShaderEntries.Count; i++)
     {
         Tuple <E_ShaderData, int> tuple = this._newShaderEntries[i];
         if ((tuple != null) && (((E_ShaderData)tuple.Item1) == dataType))
         {
             this._newShaderEntries[i] = null;
             return(tuple.Item2);
         }
     }
     return(-1);
 }