public Repair() { ObjectDataLink = new ConnectedListLink <Repair, clsObjectData>(this); TurretType = TurretType.Repair; }
public Sensor() { ObjectDataLink = new ConnectedListLink <Sensor, clsObjectData>(this); TurretType = TurretType.Sensor; }
public Construct() { ObjectDataLink = new ConnectedListLink <Construct, clsObjectData>(this); TurretType = TurretType.Construct; }
public Weapon() { ObjectDataLink = new ConnectedListLink <Weapon, clsObjectData>(this); TurretType = TurretType.Weapon; }
public Ecm() { ObjectDataLink = new ConnectedListLink <Ecm, clsObjectData>(this); TurretType = TurretType.ECM; }
public Brain() { ObjectDataLink = new ConnectedListLink <Brain, clsObjectData>(this); TurretType = TurretType.Brain; }
public clsMap() { frmMainLink = new ConnectedListLink<clsMap, frmMain>(this); Gateways = new ConnectedList<clsGateway, clsMap>(this); Initialize(); }
public StructureTypeBase() { StructureType_ObjectDataLink = new ConnectedListLink <StructureTypeBase, clsObjectData>(this); WallLink = new ConnectedListLink <StructureTypeBase, clsWallType>(this); Type = UnitType.PlayerStructure; }
public DroidTemplate() { DroidTemplate_ObjectDataLink = new ConnectedListLink <DroidTemplate, clsObjectData>(this); IsTemplate = true; Name = "Unknown"; }
public Option(string saveKey, ValueType defaultValue) { groupLink = new ConnectedListLink <OptionInterface, OptionGroup>(this); this.saveKey = saveKey; this.defaultValue = defaultValue; }
public clsWallType() { WallType_ObjectDataLink = new ConnectedListLink <clsWallType, clsObjectData>(this); Segments = new ConnectedList <StructureTypeBase, clsWallType>(this); Segments.MaintainOrder = true; }
public FeatureTypeBase() { Footprint = new XYInt(0, 0); FeatureType_ObjectDataLink = new ConnectedListLink <FeatureTypeBase, clsObjectData>(this); Type = UnitType.Feature; }
public clsMap(sXY_int TileSize) { frmMainLink = new ConnectedListLink<clsMap, frmMain>(this); Gateways = new ConnectedList<clsGateway, clsMap>(this); Initialize(); TerrainBlank(TileSize); TileType_Reset(); }
public Propulsion(int BodyCount) { ObjectDataLink = new ConnectedListLink <Propulsion, clsObjectData>(this); ComponentType = ComponentType.Propulsion; var A = 0; Bodies = new sBody[BodyCount]; for (A = 0; A <= BodyCount - 1; A++) { Bodies[A].LeftAttachment = new clsAttachment(); Bodies[A].RightAttachment = new clsAttachment(); } }
public Unit(Unit unitToCopy, Map targetMap) { MapLink = new ConnectedListLink <Unit, Map>(this); MapSelectedUnitLink = new ConnectedListLink <Unit, Map>(this); Sectors = new ConnectedList <clsUnitSectorConnection, Unit>(this); var IsDesign = default(bool); if (unitToCopy.TypeBase.Type == UnitType.PlayerDroid) { IsDesign = !((DroidDesign)unitToCopy.TypeBase).IsTemplate; } else { IsDesign = false; } if (IsDesign) { var DroidDesign = new DroidDesign(); TypeBase = DroidDesign; DroidDesign.CopyDesign((DroidDesign)unitToCopy.TypeBase); DroidDesign.UpdateAttachments(); } else { TypeBase = unitToCopy.TypeBase; } Pos = unitToCopy.Pos; Rotation = unitToCopy.Rotation; var otherUnitGroup = default(clsUnitGroup); otherUnitGroup = unitToCopy.UnitGroup; if (otherUnitGroup.WZ_StartPos < 0) { UnitGroup = targetMap.ScavengerUnitGroup; } else { UnitGroup = targetMap.UnitGroups[otherUnitGroup.WZ_StartPos]; } SavePriority = unitToCopy.SavePriority; Health = unitToCopy.Health; PreferPartsOutput = unitToCopy.PreferPartsOutput; }
public clsMap() { SectorCount = new XYInt(0, 0); Selected_Area_VertexA = new XYInt(0, 0); Selected_Area_VertexB = new XYInt(0, 0); frmMainLink = new ConnectedListLink<clsMap, frmMain>(this); Sectors = new clsSector[0, 0]; ShadowSectors = new clsShadowSector[0, 0]; HeightMultiplier = 2; _ReadyForUserInput = false; ChangedSinceSave = false; AutoSave = new clsAutoSave(); Painter = new Painter(); Tile_TypeNum = new byte[0]; Gateways = new ConnectedList<clsGateway, clsMap>(this); Units = new ConnectedList<clsUnit, clsMap>(this); UnitGroups = new ConnectedList<clsUnitGroup, clsMap>(this); ScriptPositions = new ConnectedList<clsScriptPosition, clsMap>(this); ScriptAreas = new ConnectedList<clsScriptArea, clsMap>(this); Initialize(); }
public StructureTypeBase() { StructureType_ObjectDataLink = new ConnectedListLink<StructureTypeBase, clsObjectData>(this); WallLink = new ConnectedListLink<StructureTypeBase, clsWallType>(this); Type = UnitType.PlayerStructure; }
public DroidTemplate() { DroidTemplate_ObjectDataLink = new ConnectedListLink<DroidTemplate, clsObjectData>(this); IsTemplate = true; Name = "Unknown"; }
public FeatureTypeBase() { Footprint = new XYInt(0, 0); FeatureType_ObjectDataLink = new ConnectedListLink<FeatureTypeBase, clsObjectData>(this); Type = UnitType.Feature; }
public clsFeatureType() { FeatureType_ObjectDataLink = new ConnectedListLink<clsFeatureType, clsObjectData>(this); Type = enumType.Feature; }
public clsWallType() { WallType_ObjectDataLink = new ConnectedListLink<clsWallType, clsObjectData>(this); Segments = new ConnectedList<StructureTypeBase, clsWallType>(this); Segments.MaintainOrder = true; }
public Gateway() { MapLink = new ConnectedListLink <Gateway, Map>(this); }
public clsScriptPosition() { _ParentMapLink = new ConnectedListLink<clsScriptPosition, clsMap>(this); }
public clsScriptArea(clsMap map) { _ParentMapLink = new ConnectedListLink<clsScriptArea, clsMap>(this); Label = map.GetDefaultScriptLabel("Area"); _ParentMapLink.Connect(map.ScriptAreas); }
public Turret() { TurretObjectDataLink = new ConnectedListLink <Turret, clsObjectData>(this); }
public clsUnitGroup() { MapLink = new ConnectedListLink<clsUnitGroup, clsMap>(this); }
public virtual void Deallocate() { CancelUserInput(); MakeMinimapTimer.Enabled = false; MakeMinimapTimer.Dispose(); MakeMinimapTimer = null; MakeMinimapTimer.Tick += MinimapTimer_Tick; frmMainLink.Deallocate(); frmMainLink = null; UnitGroups.Deallocate(); UnitGroups = null; while ( Units.Count > 0 ) { Units[0].Deallocate(); } Units.Deallocate(); Units = null; while ( Gateways.Count > 0 ) { Gateways[0].Deallocate(); } Gateways.Deallocate(); Gateways = null; while ( ScriptPositions.Count > 0 ) { ScriptPositions[0].Deallocate(); } ScriptPositions.Deallocate(); ScriptPositions = null; while ( ScriptAreas.Count > 0 ) { ScriptAreas[0].Deallocate(); } ScriptAreas.Deallocate(); ScriptAreas = null; }
public clsPropulsion(int BodyCount) { ObjectDataLink = new ConnectedListLink<clsPropulsion, clsObjectData>(this); ComponentType = enumComponentType.Propulsion; int A = 0; Bodies = new sBody[BodyCount]; for ( A = 0; A <= BodyCount - 1; A++ ) { Bodies[A].LeftAttachment = new clsUnitType.clsAttachment(); Bodies[A].RightAttachment = new clsUnitType.clsAttachment(); } }
public clsECM() { ObjectDataLink = new ConnectedListLink<clsECM, clsObjectData>(this); TurretType = enumTurretType.ECM; }
public clsStructureType() { StructureType_ObjectDataLink = new ConnectedListLink<clsStructureType, clsObjectData>(this); WallLink = new ConnectedListLink<clsStructureType, clsWallType>(this); Type = enumType.PlayerStructure; }
public UnitTypeBase() { UnitType_frmMainSelectedLink = new ConnectedListLink<UnitTypeBase, frmMain>(this); UnitType_ObjectDataLink = new ConnectedListLink<UnitTypeBase, clsObjectData>(this); }
public clsScriptArea(Map map) { _ParentMapLink = new ConnectedListLink <clsScriptArea, Map>(this); Label = map.GetDefaultScriptLabel("Area"); _ParentMapLink.Connect(map.ScriptAreas); }
public clsUnitGroup() { MapLink = new ConnectedListLink <clsUnitGroup, Map>(this); }
public clsBrain() { ObjectDataLink = new ConnectedListLink<clsBrain, clsObjectData>(this); TurretType = enumTurretType.Brain; }
public clsScriptArea() { _ParentMapLink = new ConnectedListLink<clsScriptArea, clsMap>(this); }
public clsConstruct() { ObjectDataLink = new ConnectedListLink<clsConstruct, clsObjectData>(this); TurretType = enumTurretType.Construct; }
public Body() { ObjectDataLink = new ConnectedListLink <Body, clsObjectData>(this); ComponentType = ComponentType.Body; }
public Unit() { MapLink = new ConnectedListLink <Unit, Map>(this); MapSelectedUnitLink = new ConnectedListLink <Unit, Map>(this); Sectors = new ConnectedList <clsUnitSectorConnection, Unit>(this); }
protected UnitTypeBase() { UnitType_frmMainSelectedLink = new ConnectedListLink <UnitTypeBase, frmMain>(this); UnitType_ObjectDataLink = new ConnectedListLink <UnitTypeBase, clsObjectData>(this); }
public clsWeapon() { ObjectDataLink = new ConnectedListLink<clsWeapon, clsObjectData>(this); TurretType = enumTurretType.Weapon; }
public clsBody() { ObjectDataLink = new ConnectedListLink<clsBody, clsObjectData>(this); ComponentType = enumComponentType.Body; }
public Ecm() { ObjectDataLink = new ConnectedListLink<Ecm, clsObjectData>(this); TurretType = enumTurretType.ECM; }
public clsGateway() { MapLink = new ConnectedListLink<clsGateway, clsMap>(this); }
public clsRepair() { ObjectDataLink = new ConnectedListLink<clsRepair, clsObjectData>(this); TurretType = enumTurretType.Repair; }
public clsSensor() { ObjectDataLink = new ConnectedListLink<clsSensor, clsObjectData>(this); TurretType = enumTurretType.Sensor; }
public clsTurret() { TurretObjectDataLink = new ConnectedListLink<clsTurret, clsObjectData>(this); }
public clsMap(clsMap MapToCopy, sXY_int Offset, sXY_int Area) { frmMainLink = new ConnectedListLink<clsMap, frmMain>(this); Gateways = new ConnectedList<clsGateway, clsMap>(this); int EndX = 0; int EndY = 0; int X = 0; int Y = 0; Initialize(); //make some map data for selection EndX = Math.Min(MapToCopy.Terrain.TileSize.X - Offset.X, Area.X); EndY = Math.Min(MapToCopy.Terrain.TileSize.Y - Offset.Y, Area.Y); Terrain = new clsTerrain(Area); for ( Y = 0; Y <= Terrain.TileSize.Y - 1; Y++ ) { for ( X = 0; X <= Terrain.TileSize.X - 1; X++ ) { Terrain.Tiles[X, Y].Texture.TextureNum = -1; } } for ( Y = 0; Y <= EndY; Y++ ) { for ( X = 0; X <= EndX; X++ ) { Terrain.Vertices[X, Y].Height = MapToCopy.Terrain.Vertices[Offset.X + X, Offset.Y + Y].Height; Terrain.Vertices[X, Y].Terrain = MapToCopy.Terrain.Vertices[Offset.X + X, Offset.Y + Y].Terrain; } } for ( Y = 0; Y <= EndY - 1; Y++ ) { for ( X = 0; X <= EndX - 1; X++ ) { Terrain.Tiles[X, Y].Copy(MapToCopy.Terrain.Tiles[Offset.X + X, Offset.Y + Y]); } } for ( Y = 0; Y <= EndY; Y++ ) { for ( X = 0; X <= EndX - 1; X++ ) { Terrain.SideH[X, Y].Road = MapToCopy.Terrain.SideH[Offset.X + X, Offset.Y + Y].Road; } } for ( Y = 0; Y <= EndY - 1; Y++ ) { for ( X = 0; X <= EndX; X++ ) { Terrain.SideV[X, Y].Road = MapToCopy.Terrain.SideV[Offset.X + X, Offset.Y + Y].Road; } } SectorCount.X = (int)(Math.Ceiling((double)(Area.X / Constants.SectorTileSize))); SectorCount.Y = (int)(Math.Ceiling((double)(Area.Y / Constants.SectorTileSize))); Sectors = new clsSector[SectorCount.X, SectorCount.Y]; for ( Y = 0; Y <= SectorCount.Y - 1; Y++ ) { for ( X = 0; X <= SectorCount.X - 1; X++ ) { Sectors[X, Y] = new clsSector(new sXY_int(X, Y)); } } sXY_int PosDif = new sXY_int(); clsUnitAdd NewUnitAdd = new clsUnitAdd(); NewUnitAdd.Map = this; clsUnit NewUnit = default(clsUnit); clsGateway Gateway = default(clsGateway); foreach ( clsGateway tempLoopVar_Gateway in MapToCopy.Gateways ) { Gateway = tempLoopVar_Gateway; GatewayCreate(new sXY_int(Gateway.PosA.X - Offset.X, Gateway.PosA.Y - Offset.Y), new sXY_int(Gateway.PosB.X - Offset.X, Gateway.PosB.Y - Offset.Y)); } PosDif.X = - Offset.X * App.TerrainGridSpacing; PosDif.Y = - Offset.Y * App.TerrainGridSpacing; clsUnit Unit = default(clsUnit); sXY_int NewPos = new sXY_int(); foreach ( clsUnit tempLoopVar_Unit in MapToCopy.Units ) { Unit = tempLoopVar_Unit; NewPos = Unit.Pos.Horizontal + PosDif; if ( PosIsOnMap(NewPos) ) { NewUnit = new clsUnit(Unit, this); NewUnit.Pos.Horizontal = NewPos; NewUnitAdd.NewUnit = NewUnit; NewUnitAdd.Label = Unit.Label; NewUnitAdd.Perform(); } } }
public clsScriptPosition() { parentMapLink = new ConnectedListLink <clsScriptPosition, Map>(this); }