public ModelSkill Copy() { ModelSkill copy = new ModelSkill(); copy.SetData(level, m_prefabPaths, m_positionPrefab, m_parent, startDelay, attackDelay); return(copy); }
protected void AddSkillData(ModelAttackLevel level, string[] prefabPaths, int[] positionPrefab, Transform parent, float startDelay, float attackDelay) { if (m_dicSkill == null) { m_dicSkill = new Dictionary <ModelAttackLevel, ModelSkill>(); } if (m_dicSkill.ContainsKey(level)) { m_dicSkill.Remove(level); } ModelSkill skillData = new ModelSkill(level, prefabPaths, positionPrefab, parent, startDelay, attackDelay); m_dicSkill.Add(level, skillData); }
public void Play(Vector3 position) { if (isPlaying) { ModelSkill copy = Copy(); copy.Play(position); return; } isPlaying = true; if (startDelay == 0) { PlaySkillAnimator(listAnimators, 0, position); } else { TimerManager.Register(startDelay, () => PlaySkillAnimator(listAnimators, 0, position)); } }