public void PlayHighLitEffect(Vector3 color)
 {
     if (this.CheckMats())
     {
         SMaterialEffect_HighLit lit = this.FindOrCreateEffect <SMaterialEffect_HighLit>(3);
         lit.color = color;
         lit.Play();
     }
 }
 public void StopHighLitEffect()
 {
     if (this.CheckMats())
     {
         SMaterialEffect_HighLit effect = this.FindEffect(3) as SMaterialEffect_HighLit;
         if (effect != null)
         {
             this.StopEffect(effect);
         }
     }
 }
示例#3
0
    public int PlayHighLitEffect(Vector3 color)
    {
        if (!this.CheckMats())
        {
            return(0);
        }
        this.m_effectCounter[3]++;
        SMaterialEffect_HighLit sMaterialEffect_HighLit = this.FindOrCreateEffect <SMaterialEffect_HighLit>(3);

        sMaterialEffect_HighLit.color = color;
        sMaterialEffect_HighLit.Play();
        MaterialHurtEffect.HighLitColor highLitColor = default(MaterialHurtEffect.HighLitColor);
        highLitColor.id    = ++this.hlcIndex;
        highLitColor.color = color;
        this.hlcList.Add(highLitColor);
        return(highLitColor.id);
    }
示例#4
0
    public void StopHighLitEffect(int id)
    {
        if (!this.CheckMats())
        {
            return;
        }
        if (id > 0)
        {
            for (int i = 0; i < this.hlcList.get_Count(); i++)
            {
                if (this.hlcList.get_Item(i).id == id)
                {
                    this.hlcList.RemoveAt(i);
                    break;
                }
            }
        }
        this.m_effectCounter[3]--;
        SMaterialEffect_HighLit sMaterialEffect_HighLit = this.FindEffect(3) as SMaterialEffect_HighLit;

        if (sMaterialEffect_HighLit == null)
        {
            return;
        }
        if (this.hlcList.get_Count() > 0 && id > 0)
        {
            sMaterialEffect_HighLit.color = this.hlcList.get_Item(this.hlcList.get_Count() - 1).color;
        }
        if (this.m_effectCounter[3] > 0)
        {
            return;
        }
        this.StopEffect(sMaterialEffect_HighLit);
        this.hlcIndex = 0;
        this.hlcList.Clear();
    }