private void OnLoaded() { ctrl = rootModel.GetComponent <ParticleCtrl>(); switch (etype) { case EType.BALLISTIC: ballistic = rootModel.GetComponent <Ballistic>(); if (null != ballistic) { ballistic.onMoveToEnd = this.OnBallisticToEnd; } SetParent(ObjLocator.Instance.effectRoot, true); break; case EType.TIMED_POS: { onTime = rootModel.GetComponent <OnTime>(); if (null == onTime) { Debug.Log(string.Format("effect:{0} is not timed", res)); } onTime.onTime = this.OnTimeOver; ObjLocator.Instance.AddManagedEffect(this); } break; case EType.TIMED_ATT: { onTime = rootModel.GetComponent <OnTime>(); if (null == onTime) { Debug.Log(string.Format("effect:{0} is not timed", res)); } onTime.onTime = this.OnTimeOver; } break; } }
private static void ProcessSingle(GameObject go) { ParticleCtrl.Attach(go); EditorUtility.SetDirty(go); }