Exemplo n.º 1
0
 // 执行算法对象
 public void CalculateTargets()
 {
     skillData.attackTargets = selector.SelectTarget(skillData, transform);
     //测试
     // foreach (var item in skillData.attackTargets) {
     //     Debug.Log ("攻击目标: " + item.name);
     // }
 }
    private void ResetTargets()
    {
        if (m_skillData == null)
        {
            return;
        }

        m_skillData.attackTargets = attackTargetSelector.SelectTarget(m_skillData, transform);
    }
Exemplo n.º 3
0
        /// <summary>
        /// 重置目标:重新选择目标
        /// </summary>
        public GameObject[] ResetTarget()
        {
            var targets = attackSelector.SelectTarget(m_SkillData, transform);

            if (targets != null && targets.Length > 0)
            {
                return(targets);
            }
            return(null);
        }
Exemplo n.º 4
0
        public GameObject[] ResetTargets()
        {
            enterTrigger.AddIgnoreObj(m_SkillData.Owner);
            var targets = attackSelector.SelectTarget(skillData, this);

            if (null != targets && targets.Length > 0)
            {
                return(targets);
            }
            return(null);
        }
Exemplo n.º 5
0
        private void Update()
        {
            skillData.attackDistance = 10;
            skillData.attackAngle    = 60;
            skillData.attackType     = SkillAttackType.Group;


            //var enemy = select01.SelectTarget(skillData, transform);

            var enemy = select02.SelectTarget(skillData, transform);

            if (enemy != null && enemy.Length != 0)
            {
                for (int i = 0; i < enemy.Length; i++)
                {
                    enemy[i].GetComponent <Renderer>().material.color = Color.red;
                }
            }
        }
Exemplo n.º 6
0
 /// <summary>
 /// /执行选区算法对象
 /// </summary>
 protected void CalculateTargets()
 {
     skillData.attackTargets = attackSelector.SelectTarget(skillData, transform);
 }
Exemplo n.º 7
0
        //执行算法对象

        //计算目标
        public void CalculateTargets()
        {
            currentSkillData.attackTargets = attackSelector.SelectTarget(transform, currentSkillData);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 根据技能释放器计算目标
        /// </summary>
        /// <returns>目标TF数组,没有目标则返回null</returns>
        public Transform[] CalculateTargets()
        {
            var targets = attackSelector.SelectTarget(skillData, transform);

            return(targets != null && targets.Length > 0 ? targets : null);
        }
Exemplo n.º 9
0
 /// <summary>
 /// 计算攻击目标
 /// </summary>
 public void CalculateTargets()
 {
     //通过选区计算目标
     currentSkillData.attackTargets = selector.SelectTarget(currentSkillData, transform);
 }
Exemplo n.º 10
0
 //执行算法对象
 //选区
 public void CalculateTargets()
 {
     m_skillData.attackTargets = selector.SelectTarget(m_skillData, transform);
 }
Exemplo n.º 11
0
 public void CalculateTargets()
 {
     skillData.attakcTargets = selector.SelectTarget(skillData, transform);
 }
Exemplo n.º 12
0
 //执行算法对象
 //选区
 public void CalculateTargets()
 {
     //攻击目标设置,在子类的DeploySkill中调用
     skillData.attackTargets = selector.SelectTarget(skillData, transform);
 }
Exemplo n.º 13
0
    }//void Start()
     //{
     //    //初始化工作量太大
     //}
     //2施放方法
    public GameObject[] ResetTargets()
    {
        var targets = attackSelector.SelectTarget(skillData, transform);

        return(targets);
    }