コード例 #1
0
        public Repair()
        {
            ObjectDataLink = new ConnectedListLink <Repair, clsObjectData>(this);


            TurretType = TurretType.Repair;
        }
コード例 #2
0
        public Sensor()
        {
            ObjectDataLink = new ConnectedListLink <Sensor, clsObjectData>(this);


            TurretType = TurretType.Sensor;
        }
コード例 #3
0
        public Construct()
        {
            ObjectDataLink = new ConnectedListLink <Construct, clsObjectData>(this);


            TurretType = TurretType.Construct;
        }
コード例 #4
0
        public Weapon()
        {
            ObjectDataLink = new ConnectedListLink <Weapon, clsObjectData>(this);


            TurretType = TurretType.Weapon;
        }
コード例 #5
0
        public Ecm()
        {
            ObjectDataLink = new ConnectedListLink <Ecm, clsObjectData>(this);


            TurretType = TurretType.ECM;
        }
コード例 #6
0
        public Brain()
        {
            ObjectDataLink = new ConnectedListLink <Brain, clsObjectData>(this);


            TurretType = TurretType.Brain;
        }
コード例 #7
0
ファイル: clsMap.cs プロジェクト: Zabanya/SharpFlame
        public clsMap()
        {
            frmMainLink = new ConnectedListLink<clsMap, frmMain>(this);
            Gateways = new ConnectedList<clsGateway, clsMap>(this);

            Initialize();
        }
コード例 #8
0
        public StructureTypeBase()
        {
            StructureType_ObjectDataLink = new ConnectedListLink <StructureTypeBase, clsObjectData>(this);
            WallLink = new ConnectedListLink <StructureTypeBase, clsWallType>(this);


            Type = UnitType.PlayerStructure;
        }
コード例 #9
0
        public DroidTemplate()
        {
            DroidTemplate_ObjectDataLink = new ConnectedListLink <DroidTemplate, clsObjectData>(this);


            IsTemplate = true;
            Name       = "Unknown";
        }
コード例 #10
0
ファイル: Options.cs プロジェクト: polytronicgr/SharpFlame
        public Option(string saveKey, ValueType defaultValue)
        {
            groupLink = new ConnectedListLink <OptionInterface, OptionGroup>(this);


            this.saveKey      = saveKey;
            this.defaultValue = defaultValue;
        }
コード例 #11
0
        public clsWallType()
        {
            WallType_ObjectDataLink = new ConnectedListLink <clsWallType, clsObjectData>(this);
            Segments = new ConnectedList <StructureTypeBase, clsWallType>(this);


            Segments.MaintainOrder = true;
        }
コード例 #12
0
        public FeatureTypeBase()
        {
            Footprint = new XYInt(0, 0);
            FeatureType_ObjectDataLink = new ConnectedListLink <FeatureTypeBase, clsObjectData>(this);


            Type = UnitType.Feature;
        }
コード例 #13
0
ファイル: clsMap.cs プロジェクト: Zabanya/SharpFlame
        public clsMap(sXY_int TileSize)
        {
            frmMainLink = new ConnectedListLink<clsMap, frmMain>(this);
            Gateways = new ConnectedList<clsGateway, clsMap>(this);

            Initialize();

            TerrainBlank(TileSize);
            TileType_Reset();
        }
コード例 #14
0
        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();
            }
        }
コード例 #15
0
        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;
        }
コード例 #16
0
ファイル: clsMap.cs プロジェクト: pcdummy/SharpFlame
        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();
        }
コード例 #17
0
ファイル: UnitTypeBase.cs プロジェクト: pcdummy/SharpFlame
        public StructureTypeBase()
        {
            StructureType_ObjectDataLink = new ConnectedListLink<StructureTypeBase, clsObjectData>(this);
            WallLink = new ConnectedListLink<StructureTypeBase, clsWallType>(this);

            Type = UnitType.PlayerStructure;
        }
コード例 #18
0
ファイル: UnitTypeBase.cs プロジェクト: pcdummy/SharpFlame
        public DroidTemplate()
        {
            DroidTemplate_ObjectDataLink = new ConnectedListLink<DroidTemplate, clsObjectData>(this);

            IsTemplate = true;
            Name = "Unknown";
        }
コード例 #19
0
ファイル: UnitTypeBase.cs プロジェクト: pcdummy/SharpFlame
        public FeatureTypeBase()
        {
            Footprint = new XYInt(0, 0);
            FeatureType_ObjectDataLink = new ConnectedListLink<FeatureTypeBase, clsObjectData>(this);

            Type = UnitType.Feature;
        }
コード例 #20
0
ファイル: clsUnitType.cs プロジェクト: Zabanya/SharpFlame
        public clsFeatureType()
        {
            FeatureType_ObjectDataLink = new ConnectedListLink<clsFeatureType, clsObjectData>(this);

            Type = enumType.Feature;
        }
コード例 #21
0
ファイル: UnitTypeBase.cs プロジェクト: pcdummy/SharpFlame
        public clsWallType()
        {
            WallType_ObjectDataLink = new ConnectedListLink<clsWallType, clsObjectData>(this);
            Segments = new ConnectedList<StructureTypeBase, clsWallType>(this);

            Segments.MaintainOrder = true;
        }
コード例 #22
0
ファイル: Gateway.cs プロジェクト: polytronicgr/SharpFlame
 public Gateway()
 {
     MapLink = new ConnectedListLink <Gateway, Map>(this);
 }
コード例 #23
0
 public clsScriptPosition()
 {
     _ParentMapLink = new ConnectedListLink<clsScriptPosition, clsMap>(this);
 }
コード例 #24
0
ファイル: clsScriptArea.cs プロジェクト: pcdummy/SharpFlame
 public clsScriptArea(clsMap map)
 {
     _ParentMapLink = new ConnectedListLink<clsScriptArea, clsMap>(this);
     Label = map.GetDefaultScriptLabel("Area");
     _ParentMapLink.Connect(map.ScriptAreas);
 }
コード例 #25
0
 public Turret()
 {
     TurretObjectDataLink = new ConnectedListLink <Turret, clsObjectData>(this);
 }
コード例 #26
0
ファイル: clsUnitGroup.cs プロジェクト: pcdummy/SharpFlame
 public clsUnitGroup()
 {
     MapLink = new ConnectedListLink<clsUnitGroup, clsMap>(this);
 }
コード例 #27
0
ファイル: clsMap.cs プロジェクト: Zabanya/SharpFlame
        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;
        }
コード例 #28
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        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();
            }
        }
コード例 #29
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        public clsECM()
        {
            ObjectDataLink = new ConnectedListLink<clsECM, clsObjectData>(this);

            TurretType = enumTurretType.ECM;
        }
コード例 #30
0
ファイル: clsUnitType.cs プロジェクト: Zabanya/SharpFlame
        public clsStructureType()
        {
            StructureType_ObjectDataLink = new ConnectedListLink<clsStructureType, clsObjectData>(this);
            WallLink = new ConnectedListLink<clsStructureType, clsWallType>(this);

            Type = enumType.PlayerStructure;
        }
コード例 #31
0
ファイル: UnitTypeBase.cs プロジェクト: pcdummy/SharpFlame
 public UnitTypeBase()
 {
     UnitType_frmMainSelectedLink = new ConnectedListLink<UnitTypeBase, frmMain>(this);
     UnitType_ObjectDataLink = new ConnectedListLink<UnitTypeBase, clsObjectData>(this);
 }
コード例 #32
0
 public clsScriptArea(Map map)
 {
     _ParentMapLink = new ConnectedListLink <clsScriptArea, Map>(this);
     Label          = map.GetDefaultScriptLabel("Area");
     _ParentMapLink.Connect(map.ScriptAreas);
 }
コード例 #33
0
 public clsUnitGroup()
 {
     MapLink = new ConnectedListLink <clsUnitGroup, Map>(this);
 }
コード例 #34
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        public clsBrain()
        {
            ObjectDataLink = new ConnectedListLink<clsBrain, clsObjectData>(this);

            TurretType = enumTurretType.Brain;
        }
コード例 #35
0
 public clsScriptArea()
 {
     _ParentMapLink = new ConnectedListLink<clsScriptArea, clsMap>(this);
 }
コード例 #36
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        public clsConstruct()
        {
            ObjectDataLink = new ConnectedListLink<clsConstruct, clsObjectData>(this);

            TurretType = enumTurretType.Construct;
        }
コード例 #37
0
        public Body()
        {
            ObjectDataLink = new ConnectedListLink <Body, clsObjectData>(this);

            ComponentType = ComponentType.Body;
        }
コード例 #38
0
 public Unit()
 {
     MapLink             = new ConnectedListLink <Unit, Map>(this);
     MapSelectedUnitLink = new ConnectedListLink <Unit, Map>(this);
     Sectors             = new ConnectedList <clsUnitSectorConnection, Unit>(this);
 }
コード例 #39
0
 protected UnitTypeBase()
 {
     UnitType_frmMainSelectedLink = new ConnectedListLink <UnitTypeBase, frmMain>(this);
     UnitType_ObjectDataLink      = new ConnectedListLink <UnitTypeBase, clsObjectData>(this);
 }
コード例 #40
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        public clsWeapon()
        {
            ObjectDataLink = new ConnectedListLink<clsWeapon, clsObjectData>(this);

            TurretType = enumTurretType.Weapon;
        }
コード例 #41
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        public clsBody()
        {
            ObjectDataLink = new ConnectedListLink<clsBody, clsObjectData>(this);

            ComponentType = enumComponentType.Body;
        }
コード例 #42
0
ファイル: ComponentBase.cs プロジェクト: pcdummy/SharpFlame
        public Ecm()
        {
            ObjectDataLink = new ConnectedListLink<Ecm, clsObjectData>(this);

            TurretType = enumTurretType.ECM;
        }
コード例 #43
0
ファイル: clsMap.cs プロジェクト: Zabanya/SharpFlame
 public clsGateway()
 {
     MapLink = new ConnectedListLink<clsGateway, clsMap>(this);
 }
コード例 #44
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        public clsRepair()
        {
            ObjectDataLink = new ConnectedListLink<clsRepair, clsObjectData>(this);

            TurretType = enumTurretType.Repair;
        }
コード例 #45
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
        public clsSensor()
        {
            ObjectDataLink = new ConnectedListLink<clsSensor, clsObjectData>(this);

            TurretType = enumTurretType.Sensor;
        }
コード例 #46
0
ファイル: clsComponent.cs プロジェクト: Zabanya/SharpFlame
 public clsTurret()
 {
     TurretObjectDataLink = new ConnectedListLink<clsTurret, clsObjectData>(this);
 }
コード例 #47
0
ファイル: clsMap.cs プロジェクト: Zabanya/SharpFlame
        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();
                }
            }
        }
コード例 #48
0
 public clsScriptPosition()
 {
     parentMapLink = new ConnectedListLink <clsScriptPosition, Map>(this);
 }