Beispiel #1
0
        public override bool Proc(EntityParent theOwner)
        {
            EntityParent enemy = theOwner.GetTargetEntity();
            if (enemy == null || enemy.curHp <= 0)
            {
                theOwner.blackBoard.enemyId = 0;
            }

            if (theOwner.blackBoard.enemyId != 0)
			{
                //Mogo.Util.LoggerHelper.Debug("AI:" + "HasFightTarget:" + "true");
			}
            else
			{
                //Mogo.Util.LoggerHelper.Debug("AI:" + "HasFightTarget:" + "false");
			}

            return theOwner.blackBoard.enemyId != 0;
        }
Beispiel #2
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo检查与之前使用技能时候所在坐标距离
            EntityParent target = theOwner.GetTargetEntity();
            if (target == null || target.Transform == null)
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpTargetDistance:" + "false");
                return false;
            }
            float testDis = Vector3.Distance(target.Transform.position, theOwner.Transform.position);
            bool rnt = CmpTypeMethod.Cmp(_cmp, (int)(testDis * 100), _distance);
            if (rnt)
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpTargetDistance:" + "true");
            }
            else
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpTargetDistance:" + "false");
            }

            return rnt;
        }