Ejemplo n.º 1
0
        public override IAbilityExecutor Clone()
        {
            var root = new AbilityRoot(keepTime);

            foreach (var modifier in modifiers)
            {
                root.modifiers.Add(modifier.Key, modifier.Value);
            }
            foreach (var abilityEvent in m_AbilityEvents)
            {
                root.m_AbilityEvents.Add(abilityEvent.Clone());
            }
            return(root);
        }
Ejemplo n.º 2
0
        public AbilityRoot Parse(DataDrivenAbility data)
        {
            AbilityRoot root = new AbilityRoot(data.keepTime);

            foreach (var abilityEvent in ParseAbilityEvent(data))
            {
                root.AddAbilityEvent(abilityEvent);
            }

            if (data.modifiers != null)
            {
                foreach (var modifier in data.modifiers)
                {
                    root.modifiers.Add(modifier.name, ParseAbilityModifier(modifier));
                }
            }

            return(root);
        }