示例#1
0
        public int Register(MySmallShipBot entity)
        {
            System.Diagnostics.Debug.Assert(entity == null || !entity.Closed);

            entity.OnPositionChanged += OnPositionChangedHandler;

            MyDangerZoneElement element = new MyDangerZoneElement(entity);

            BoundingBox bbox = new BoundingBox(entity.WorldAABB.Min - new Vector3(DANGER_ZONE_SIZE), entity.WorldAABB.Max + new Vector3(DANGER_ZONE_SIZE));

            int proxyId = m_dangerZoneStructure.AddProxy(ref bbox, element, 0);

            return proxyId;
        }
示例#2
0
        public int Register(MySmallShipBot entity)
        {
            System.Diagnostics.Debug.Assert(entity == null || !entity.Closed);

            entity.OnPositionChanged += OnPositionChangedHandler;

            MyDangerZoneElement element = new MyDangerZoneElement(entity);

            BoundingBox bbox = new BoundingBox(entity.WorldAABB.Min - new Vector3(DANGER_ZONE_SIZE), entity.WorldAABB.Max + new Vector3(DANGER_ZONE_SIZE));

            int proxyId = m_dangerZoneStructure.AddProxy(ref bbox, element, 0);

            return(proxyId);
        }