public bool validCast(KBEngine.Entity caster, SCObject target)
		{
			float dist = Vector3.Distance(target.getPosition(), caster.position);
			if(dist > canUseDistMax)
				return false;
			
			return true;
		}
Exemple #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);
        }
Exemple #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);
        }
        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);
        }
Exemple #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);
        }
Exemple #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});
		}
Exemple #8
0
 public void use(KBEngine.Entity caster, SCObject target)
 {
     caster.cellCall("useTargetSkill", id, ((SCEntityObject)target).targetID);
     restCoolTimer = 0f;
 }
 public void use(KBEngine.Entity caster, SCObject target)
 {
     caster.cellCall("useTargetSkill", id, ((SCEntityObject)target).targetID);
     lastUsedTime = System.DateTime.Now;
 }
Exemple #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;
        }
Exemple #11
0
 public void use(KBEngine.Entity caster, SCObject target)
 {
     caster.cellCall("useTargetSkill", id, ((SCEntityObject)target).targetID);
     restCoolTimer = 0f;
 }