Beispiel #1
0
        // ---------------------------------------------------------------------
        //
        // Callbacks
        //
        // ---------------------------------------------------------------------

        public void OnAddIsoObject(IsoObject iso_object)
        {
            iso_object.Internal.QTItem = _quadTree.AddItem(
                iso_object.Internal.QTBounds,
                iso_object);
            _minIsoXY = IsoUtils.Vec2Min(_minIsoXY, iso_object.position);
            RegisterIsoObjectParent(iso_object);
        }
Beispiel #2
0
 public bool OnMarkDirtyIsoObject(IsoObject iso_object)
 {
     if (iso_object.Internal.QTItem != null)
     {
         iso_object.Internal.QTItem = _quadTree.MoveItem(
             iso_object.Internal.QTBounds,
             iso_object.Internal.QTItem);
     }
     else
     {
         iso_object.Internal.QTItem = _quadTree.AddItem(
             iso_object.Internal.QTBounds,
             iso_object);
     }
     _minIsoXY = IsoUtils.Vec2Min(_minIsoXY, iso_object.position);
     if (!iso_object.Internal.Dirty)
     {
         iso_object.Internal.Dirty = true;
         return(true);
     }
     return(false);
 }