示例#1
0
        public bool validCast(KBEngine.Entity caster, SCObject target)
        {
            float dist = Vector3.Distance(target.getPosition(), caster.position);

            Debug.Log("skill dis:" + target.getPosition() + " - " + caster.position + " - " + dist + " - " + canUseDistMax);
            if (dist > canUseDistMax)
            {
                return(false);
            }

            return(true);
        }
		public bool validCast(KBEngine.Entity caster, SCObject target)
		{
			float dist = Vector3.Distance(target.getPosition(), caster.position);
			if(dist > canUseDistMax)
				return false;
			
			return true;
		}
示例#3
0
        public bool validCast(KBEngine.Entity caster, SCObject target)
        {
            float dist = Vector3.Distance(target.getPosition(), caster.position);

            if (dist > canUseDistMax)
            {
                return(false);
            }

            return(true);
        }
        public bool validCast(KBEngine.Entity caster, SCObject target)
        {
            TimeSpan span = DateTime.Now - lastUsedTime;

            if (span.TotalMilliseconds < 300)
            {
                return(false);
            }

            float dist = Vector3.Distance(target.getPosition(), caster.position);

            if (dist > canUseDistMax)
            {
                return(false);
            }

            return(true);
        }
示例#5
0
        //1: 太远, 2:冷却,3:已死亡
        public int validCast(KBEngine.Entity caster, SCObject target)
        {
            float dist = Vector3.Distance(target.getPosition(), caster.position);

            if (dist > canUseDistMax)
            {
                return(1);
            }
            if (restCoolTimer < coolTime)
            {
                return(2);
            }
            if (((SByte)(caster.getDefinedProperty("state"))) == 1)
            {
                return(3);
            }

            return(0);
        }
示例#6
0
文件: Skill.cs 项目: liuxq/TestGame
        //1: 太远, 2:冷却,3:已死亡
        public int validCast(KBEngine.Entity caster, SCObject target)
        {
            float dist = Vector3.Distance(target.getPosition(), caster.position);
            if (dist > canUseDistMax)
                return 1;
            if (restCoolTimer < coolTime)
                return 2;
            if (((SByte)(caster.getDefinedProperty("state"))) == 1)
                return 3;

            return 0;
        }