public void AddMultiEventEffect(MultiEventDinoEffectController multiEffect) { EventEffects multiEventEffects = new EventEffects(); multiEventEffects.MakeEffects(multiEffect); m_multiEffects.Add(multiEventEffects); }
public void AddMultiEventSkillEffect(MultiEventDinoEffectController multiEffect) { string eventName = multiEffect.eventName; if (m_multiEvents.ContainsKey(eventName)) { m_multiEvents[eventName].AddMultiEventEffect(multiEffect); } else { MultiEventEffects multiEventEffects = new MultiEventEffects(); multiEventEffects.AddMultiEventEffect(multiEffect); m_multiEvents.Add(eventName, multiEventEffects); } }
private void EnrollMultiEventSkillEffect(DinoEffectController effect) { string animationName = effect.animationName; MultiEventDinoEffectController effectController = effect as MultiEventDinoEffectController; if (m_multiEventSkillEffects.ContainsKey(animationName)) { m_multiEventSkillEffects[animationName].AddMultiEventSkillEffect(effectController); } else { MultiEventSkillEffect multiEventSkillEffect = new MultiEventSkillEffect(); multiEventSkillEffect.AddMultiEventSkillEffect(effectController); m_multiEventSkillEffects.Add(animationName, multiEventSkillEffect); } }
public void MakeEffects(MultiEventDinoEffectController multiEffect) { m_multiEventEffects.Add(multiEffect); int count = multiEffect.count - 1; if (count <= 0) { return; } GameObject effectObject = multiEffect.gameObject; Transform parent = multiEffect.transform.parent; for (int i = 0; i < count; i++) { GameObject o = MonoBehaviour.Instantiate(effectObject) as GameObject; o.transform.SetParent(parent); o.transform.localPosition = multiEffect.transform.localPosition; o.transform.localEulerAngles = multiEffect.transform.localEulerAngles; o.transform.localScale = multiEffect.transform.localScale; MultiEventDinoEffectController effect = o.GetComponent <MultiEventDinoEffectController>(); m_multiEventEffects.Add(effect); } }