public override bool Find() { if (GameTools.GetDistance(npc.GetPosition()) >= 7) { IsAttack = false; } return(false); }
public bool Attack() { if (GameTools.GetDistance(GetPosition()) > skillConf.range) { return(false); } if (gas < skillLevel.gas) { return(false); } CreateSkill(); int damage = (int)GameTools.CalculateDamage(GameManage.Instance.role, skillLevel, skillConf); GameTools.Damage(GameManage.Instance.role, damage, skillConf.skillEffectType, skillLevel); gas -= skillLevel.gas; return(true); }