Exemple #1
0
        void OnMapObjectChanged(MovableObject ob, IntVector3 l, MapTileObjectChangeType changeType)
        {
            if (!m_box.Contains(l))
            {
                return;
            }

            switch (changeType)
            {
            case MapTileObjectChangeType.Add:
                Debug.Assert(!m_objects.Contains(ob));
                m_objects.Add(ob);
                break;

            case MapTileObjectChangeType.Remove:
                bool ok = m_objects.Remove(ob);
                Debug.Assert(ok);
                break;

            case MapTileObjectChangeType.Update:
                break;

            default:
                throw new Exception();
            }
        }
Exemple #2
0
        void OnMapObjectChanged(MovableObject ob, IntPoint3 l, MapTileObjectChangeType changeType)
        {
            if (!m_box.Contains(l))
                return;

            switch (changeType)
            {
                case MapTileObjectChangeType.Add:
                    Debug.Assert(!m_objects.Contains(ob));
                    m_objects.Add(ob);
                    break;

                case MapTileObjectChangeType.Remove:
                    bool ok = m_objects.Remove(ob);
                    Debug.Assert(ok);
                    break;

                case MapTileObjectChangeType.Update:
                    break;

                default:
                    throw new Exception();
            }
        }
Exemple #3
0
        void MapObjectChangedCallback(MovableObject ob, IntPoint3 l, MapTileObjectChangeType changetype)
        {
            if (!m_renderView.Contains(l))
                return;

            InvalidateTileData();
        }