Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
                        }
                    }
                }
            }
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 5
0
 public CTerrainNodeData(int nType)
 {
     this.m_nType = nType;
     this.m_oPos  = new CVector3();
 }
Ejemplo n.º 6
0
 public CTerrainNodeData()
 {
     this.m_nType = 0;
     this.m_oPos  = new CVector3();
 }