public bool isInSkillRange(LGAvatar lga, Variant skilconf) { int skillCastRang = this.getSkillCastRang(skilconf); int num = 1 + skillCastRang; return(base.IsInRange(lga, (float)num, false)); }
public bool IsInRange(LGAvatar lga, float rangePixel, bool iscell = true) { if (iscell) { return(IsInRange(lga.x, lga.y, rangePixel, iscell)); } float dis = Vector3.Distance(lga.grAvatar.pTrans.position, grAvatar.pTrans.position); return(dis <= rangePixel); }
public bool IsInRange(LGAvatar lga, float rangePixel, bool iscell = true) { bool result; if (iscell) { result = this.IsInRange(lga.x, lga.y, rangePixel, iscell); } else { float num = Vector3.Distance(lga.grAvatar.pTrans.position, this.grAvatar.pTrans.position); result = (num <= rangePixel); } return(result); }
public void OnAttack(Variant data, LGAvatar toChar) { bool flag = this.IsDie(); if (!flag) { bool flag2 = this.isMainPlayer(); if (!flag2) { bool flag3 = toChar == null; if (!flag3) { this.RotationToPt(toChar.x, toChar.y); this.playAttackAni(false); } } } }
private void _reach_to_npc(LGAvatar npc) { base.stop(); int num = 0; bool flag = num == 2; if (!flag) { bool flag2 = num == 0; if (flag2) { bool flag3 = npc != null; if (flag3) { MouseClickMgr.instance.onSelectNpc(npc as LGAvatarNpc); } } } }
public void OnAttack(Variant data, LGAvatar toChar) { //if (m_bsong_c) //{ // m_bsong_c = false; // //OnSOver(); //} //else //{ // m_bsong_c = true; // OnSong(); //} //return; if (IsDie()) { return; } if (isMainPlayer()) { return; } if (toChar == null) { return; } //设置正面朝目标 RotationToPt(toChar.x, toChar.y); //if (m_ani == "run" || m_ani == "idle") //{ playAttackAni(); //} }
public void faceToAvatar(LGAvatar avatar) { RotationToPt(avatar.grAvatar.pTrans.position.x, avatar.grAvatar.pTrans.position.z); }
public bool isInSkillRange(LGAvatar lga, SkillData sdta) { return(base.IsInRange(lga, sdta.range, false)); }
public bool isInAttackRange(LGAvatar lga) { return(base.IsInRange(lga, (float)this.attackRange(null), false)); }