Пример #1
0
 public void CancelSkill(ActionSkill se)
 {
     if (se == null)
     {
         return;
     }
     se.CancelSkill();
 }
Пример #2
0
 public override void Reset()
 {
     for (int i = _skillEntityList.Count - 1; i >= 0; --i)
     {
         ActionSkill se = _skillEntityList[i];
         se.CancelSkill();
     }
     _skillEntityList.Clear();
 }
Пример #3
0
        public ActionSkill CastSkill(string name)
        {
            MetaSkill skillData = GetSkill(name);

            if (skillData == null)
            {
                skillData = new MetaSkill();
            }
            ActionSkill skillEntity = new ActionSkill();

            skillEntity.SkillData = skillData;
            _skillEntityList.Add(skillEntity);
            return(skillEntity);
        }
Пример #4
0
 public void Resume()
 {
     for (int i = _skillEntityList.Count - 1; i >= 0; --i)
     {
         ActionSkill se = _skillEntityList[i];
         se.Resume();
     }
     foreach (EffectBase eff in Effects)
     {
         if (eff != null)
         {
             eff.Resume();
         }
     }
 }
Пример #5
0
 public override void Update()
 {
     for (int i = _skillEntityList.Count - 1; i >= 0; --i)
     {
         ActionSkill se = _skillEntityList[i];
         se.Update();
         if (se.SkillStage == ActionSkill.eSkillStage.RealEnd)
         {
             se.OnDestroy();
             se = null;
             _skillEntityList.RemoveAt(i);
         }
     }
     for (int i = Effects.Count - 1; i >= 0; --i)
     {
         if (Effects[i] == null)
         {
             Effects.RemoveAt(i);
         }
     }
 }
Пример #6
0
        public override void playStage()
        {
            base.playStage();
            if (Selection.activeGameObject == null)
            {
                return;
            }
            TreeNode node = _treeView.SelectedNode;

            if (node == null)
            {
                return;
            }
            NodeData data = node.Data as NodeData;

            if (data == null)
            {
                return;
            }
            MetaSkill skill  = null;
            bool      single = false;

            if (data.Type == NodeData.eType.Entity)
            {
                skill = node.ExtraData as MetaSkill;
            }
            else if (data.Type == NodeData.eType.Stage)
            {
                single = true;
                skill  = new MetaSkill();
                if (node.Text == "SingStage")
                {
                    skill.SingStage = node.ExtraData as MetaStage;
                }
                else if (node.Text == "ChannelStage")
                {
                    skill.ChannelStage = node.ExtraData as MetaStage;
                }
                else if (node.Text == "CastStage")
                {
                    skill.CastStage = node.ExtraData as MetaStage;
                }
                else if (node.Text == "EndStage")
                {
                    skill.EndStage = node.ExtraData as MetaStage;
                }
                else if (node.Text == "PandingStage")
                {
                    skill.PandingStage = node.ExtraData as MetaStage;
                }
            }
            if (skill == null)
            {
                return;
            }
            ActionSkill skillEntity = new ActionSkill();

            SkillMgr.Instance.AddSkillEntity(skillEntity);
            Debug.Log("SkillEntity" + Time.time.ToString());
            skillEntity.SkillData = skill;
            skillEntity.Attacker  = (ulong)Selection.activeGameObject.GetInstanceID();
            if (single)
            {
                skillEntity.SingTime    = 0.0f;
                skillEntity.ChannelTime = 0.0f;
                skillEntity.CastTime    = 3.0f;
            }
            else
            {
                skillEntity.SingTime    = 0.0f;
                skillEntity.ChannelTime = 0.0f;
                skillEntity.CastTime    = 0.0f;
            }
            Vector3 specialPos = Selection.activeGameObject.transform.position + Selection.activeGameObject.transform.forward * 4;

            specialPos.y          += 2;
            skillEntity.SpecailPos = specialPos;

            //skillEntity.ProcessInterface = ScriptMgr.Instance.GetGlobalTable("ISkill_default");

            skillEntity.Start();
        }
Пример #7
0
 public void AddSkillEntity(ActionSkill se)
 {
     _skillEntityList.Add(se);
 }