UltimateZoneBuilder/Source/Plugins/BuilderModes/VisualModes/ThingData.cs

59 lines
1.4 KiB
C#
Raw Normal View History

2010-09-15 09:08:40 +00:00
#region === Copyright (c) 2010 Pascal van der Heiden ===
using System.Collections.Generic;
using CodeImp.DoomBuilder.Map;
#endregion
namespace CodeImp.DoomBuilder.BuilderModes
2010-09-15 09:08:40 +00:00
{
internal class ThingData
{
#region ================== Variables
// VisualMode
private BaseVisualMode mode;
// Thing for which this data is
private Thing thing;
// Sectors that must be updated when this thing is changed
// The boolean value is the 'includeneighbours' of the UpdateSectorGeometry function which
// indicates if the sidedefs of neighbouring sectors should also be rebuilt.
private Dictionary<Sector, bool> updatesectors;
#endregion
#region ================== Properties
public Thing Thing { get { return thing; } }
public BaseVisualMode Mode { get { return mode; } }
public Dictionary<Sector, bool> UpdateAlso { get { return updatesectors; } }
#endregion
#region ================== Constructor / Destructor
// Constructor
public ThingData(BaseVisualMode mode, Thing t)
{
// Initialize
this.mode = mode;
this.thing = t;
this.updatesectors = new Dictionary<Sector, bool>(2);
}
#endregion
#region ================== Public Methods
// This adds a sector for updating
public void AddUpdateSector(Sector s, bool includeneighbours)
{
updatesectors[s] = includeneighbours;
}
#endregion
}
}