コード例 #1
0
 protected virtual void Init(Dictionary <Renderer, GlowObject> list)
 {
     if (glowTarget == GlowTarget.Self)
     {
         return;
     }
     Renderer[] rs = gameObject.GetComponentsInChildren <Renderer>();
     if (rs == null)
     {
         return;
     }
     foreach (Renderer r in rs)
     {
         GlowMono m = r.gameObject.AddComponent <GlowMono>();
         m.obj  = this;
         m.list = list;
         ms.Add(m);
     }
 }
コード例 #2
0
ファイル: GlowOutLineObject.cs プロジェクト: zwong91/Titan
        protected override void Init(Dictionary <Renderer, GlowObject> list)
        {
            Transform SkinDataObj = transform.Find("SkinDataObj");

            {
                MeshRenderer[] rs = gameObject.GetComponentsInChildren <MeshRenderer>();
                if (rs == null)
                {
                    return;
                }
                foreach (MeshRenderer r in rs)
                {
                    if (SkinDataObj && r.transform.IsChildOf(SkinDataObj))
                    {
                        continue;
                    }
                    GlowMono m = r.gameObject.AddComponent <GlowMono>();
                    m.obj  = this;
                    m.list = list;
                    ms.Add(m);
                }
            }
            {
                SkinnedMeshRenderer[] rs = gameObject.GetComponentsInChildren <SkinnedMeshRenderer>();
                if (rs == null)
                {
                    return;
                }
                foreach (SkinnedMeshRenderer r in rs)
                {
                    if (SkinDataObj && r.transform.IsChildOf(SkinDataObj))
                    {
                        continue;
                    }
                    GlowMono m = r.gameObject.AddComponent <GlowMono>();
                    m.obj  = this;
                    m.list = list;
                    ms.Add(m);
                }
            }
        }