コード例 #1
0
        public void AddMultiEventEffect(MultiEventDinoEffectController multiEffect)
        {
            EventEffects multiEventEffects = new EventEffects();

            multiEventEffects.MakeEffects(multiEffect);
            m_multiEffects.Add(multiEventEffects);
        }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
    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);
        }
    }
コード例 #4
0
            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);
                }
            }