Пример #1
0
        public void GetNearEnemys(long unSrcBeastId, int nMaxDis, bool bNeedInLine, ref List <long> listBeastId)
        {
            Beast beastById = Singleton <BeastManager> .singleton.GetBeastById(unSrcBeastId);

            if (beastById != null && null != listBeastId)
            {
                CVector3 pos = beastById.Pos;
                this.GetNearEnemys(unSrcBeastId, pos, bNeedInLine, nMaxDis, ref listBeastId);
            }
        }
Пример #2
0
        public void GetNearEnemys(long unSrcBeastId, CVector3 vSrcPos, bool bNeedInLine, int nMaxDis, ref List <long> listBeastId)
        {
            List <long> allEnemys = Singleton <BeastManager> .singleton.GetAllEnemy(unSrcBeastId);

            foreach (long current in allEnemys)
            {
                Beast beast = Singleton <BeastManager> .singleton.GetBeastById(current);

                if (!beast.IsDead)
                {
                    uint num = base.CalDistance(beast.Pos, vSrcPos);
                    if (num <= nMaxDis)
                    {
                        if (!bNeedInLine || base.IsLine(beast.Pos, vSrcPos))
                        {
                            listBeastId.Add(current);
                        }
                    }
                }
            }
        }
Пример #3
0
 public CPtcCReq_AddRoleToScene()
     : base(1023)
 {
     this.m_unRoleId = 0;
     this.m_oInitPos = new CVector3();
 }
 public CPtcCNtf_AddRoleToScene() : base(1024)
 {
     this.m_dwRoleID    = 0;
     this.m_oInitialPos = new CVector3();
 }
 public CTerrainNodeData(int nType)
 {
     this.m_nType = nType;
     this.m_oPos  = new CVector3();
 }
 public CTerrainNodeData()
 {
     this.m_nType = 0;
     this.m_oPos  = new CVector3();
 }