Exemplo n.º 1
0
        public void Unregister(MySmallShipBot entity)
        {
            System.Diagnostics.Debug.Assert(entity == null || !entity.Closed);

            entity.OnPositionChanged -= OnPositionChangedHandler;
            m_dangerZoneStructure.RemoveProxy(entity.GetDangerZoneID());
        }
Exemplo n.º 2
0
        public void Unregister(MySmallShipBot entity)
        {
            System.Diagnostics.Debug.Assert(entity == null || !entity.Closed);

            entity.OnPositionChanged -= OnPositionChangedHandler;
            m_dangerZoneStructure.RemoveProxy(entity.GetDangerZoneID());
        }
Exemplo n.º 3
0
        void OnEntityPositionChanged(object sender, EventArgs e)
        {
            MySmallShipBot smallShip = sender as MySmallShipBot;

            if (smallShip != null)
            {
                BoundingBox bbox = new BoundingBox(smallShip.WorldAABB.Min - new Vector3(DANGER_ZONE_SIZE), smallShip.WorldAABB.Max + new Vector3(DANGER_ZONE_SIZE));
                m_dangerZoneStructure.MoveProxy(smallShip.GetDangerZoneID(), ref bbox, Vector3.Zero);
            }
        }