示例#1
0
文件: Character.cs 项目: unnam2/Unity
 protected override void OnStart()
 {
     base.OnStart();
     m_skillManage.Init(this);
     m_navMeshManage.Start();
     m_coroutineMove = null;
     m_target        = null;
 }
示例#2
0
 private void SkillAttack()
 {
     //开始攻击
     //清除空对象 因为你在等待放技能的时候对方对象可能死翘翘了 所以要干掉为空的对象
     CleanupNullTransforms();
     if (this.targets.Count > 0 && this.attacker != null)
     {
         skillManage.Init(this.attacker, this.targets, this.skillDamages);
     }
     else
     {
         //攻击方死了 或者被攻击方翘辫子了
         attack_phase.SetState(AttackPhase.Done);
     }
 }
示例#3
0
        public void OnSkillState(SkillData skillState)
        {
            //buffs = new Dictionary<int, BuffInfo>();
            this.skillState = skillState;
            buffs           = new Dictionary <int, int[]>();
            for (int i = 0; i < skillState.skillDamages.Count; i++)
            {
                if (skillState.skillDamages[i].buffInfo != null)
                {
                    buffs.Add(i, skillState.skillDamages[i].buffInfo);
                }
            }


            SkillManage skillManage = Instantiate(Resources.Load <SkillManage>("Prefab/Skill/" + skillState.skillInfo.Id));

            skillManage.Init(skillState.attacker, skillState.targets, skillState.skillDamages);
            skillManage.OnComplete += OnComplete;
        }