public bool validCast(KBEngine.Entity caster, SCObject target)
		{
			float dist = Vector3.Distance(target.getPosition(), caster.position);
			if(dist > canUseDistMax)
				return false;
			
			return true;
		}
Ejemplo n.º 2
0
        public bool validCast(KBEngine.Entity caster, SCObject target)
        {
            float dist = Vector3.Distance(target.getPosition(), caster.position);

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

            return(true);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
 public void use(KBEngine.Entity caster, SCObject target)
 {
     caster.cellCall("useTargetSkill", new object[] { id, ((SCEntityObject)target).targetID });
 }
		public void use(KBEngine.Entity caster, SCObject target)
		{
			caster.cellCall("useTargetSkill", new object[]{id, ((SCEntityObject)target).targetID});
		}
Ejemplo n.º 8
0
 public void use(KBEngine.Entity caster, SCObject target)
 {
     caster.cellCall("useTargetSkill", id, ((SCEntityObject)target).targetID);
     restCoolTimer = 0f;
 }
Ejemplo n.º 9
0
 public void use(KBEngine.Entity caster, SCObject target)
 {
     caster.cellCall("useTargetSkill", id, ((SCEntityObject)target).targetID);
     lastUsedTime = System.DateTime.Now;
 }
Ejemplo n.º 10
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;
        }
Ejemplo n.º 11
0
 public void use(KBEngine.Entity caster, SCObject target)
 {
     caster.cellCall("useTargetSkill", id, ((SCEntityObject)target).targetID);
     restCoolTimer = 0f;
 }