示例#1
0
 public override bool Find()
 {
     if (GameTools.GetDistance(npc.GetPosition()) >= 7)
     {
         IsAttack = false;
     }
     return(false);
 }
示例#2
0
文件: NPC.cs 项目: KGtingfeng/test
    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);
    }