void Awake() { m_instance = this; foreach (Transform child in transform) { XffectComponent xft = child.GetComponent <XffectComponent>(); if (xft != null) { //make sure all children is inited. xft.Initialize(); if (!EffectDic.ContainsKey(child.name)) { EffectDic[child.name] = new ArrayList(); } EffectDic[child.name].Add(xft); } CompositeXffect cxft = child.GetComponent <CompositeXffect>(); if (cxft != null) { cxft.Initialize(); if (!CompEffectDic.ContainsKey(child.name)) { CompEffectDic[child.name] = new ArrayList(); } CompEffectDic[child.name].Add(cxft); } } }
void Start() { EffectCache = ObjectCache.GetComponent<XffectCache>(); }
private void Start() { this.EffectCache = this.ObjectCache.GetComponent <XffectCache>(); }
private void Start() { EffectCache = ObjectCache.GetComponent <XffectCache>(); }
void Awake() { m_instance = this; foreach (Transform child in transform) { XffectComponent xft = child.GetComponent<XffectComponent>(); if (xft != null) { //make sure all children is inited. xft.Initialize(); if (!EffectDic.ContainsKey(child.name)) EffectDic[child.name] = new ArrayList(); EffectDic[child.name].Add(xft); } CompositeXffect cxft = child.GetComponent<CompositeXffect>(); if (cxft != null) { cxft.Initialize(); if (!CompEffectDic.ContainsKey(child.name)) CompEffectDic[child.name] = new ArrayList(); CompEffectDic[child.name].Add(cxft); } } }