예제 #1
0
        public bool isInSkillRange(LGAvatar lga, Variant skilconf)
        {
            int skillCastRang = this.getSkillCastRang(skilconf);
            int num           = 1 + skillCastRang;

            return(base.IsInRange(lga, (float)num, false));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
                    }
                }
            }
        }
예제 #5
0
        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);
                    }
                }
            }
        }
예제 #6
0
        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();
            //}
        }
예제 #7
0
 public void faceToAvatar(LGAvatar avatar)
 {
     RotationToPt(avatar.grAvatar.pTrans.position.x, avatar.grAvatar.pTrans.position.z);
 }
예제 #8
0
 public bool isInSkillRange(LGAvatar lga, SkillData sdta)
 {
     return(base.IsInRange(lga, sdta.range, false));
 }
예제 #9
0
 public bool isInAttackRange(LGAvatar lga)
 {
     return(base.IsInRange(lga, (float)this.attackRange(null), false));
 }