public SceneEditGameWorld(GameSystem gs, GameWorldSystem gw) : base(gs) { gameWorld = gw; mapSpritesInfo = new TileMapSprites.MapSpritesInfo(gameWorld); zoomableTileMapSprites = new ZoomableTileMapSprites <TileMapSprites>(); addChild(zoomableTileMapSprites); uiTileInfoPanel = new UITileInfoPanel(gameSystem, new Point(30, formMain.Height - 108)); addChild(uiTileInfoPanel); loadMap(); uiEditGameWorldTileMapMenuWindow = new UIEditGameWorldTileMapMenuWindow( gameSystem, onPointerButtonClicked, onBrushButtonClicked, onRectangleButtonClicked, onFillButtonClicked, onTerrainSelected); pointerStatus = new PointerStatus(this); drawTileStatus = new DrawTileStatus(this); drawTileRectangleStatus = new DrawTileRectangleStatus(this); drawTileFillStatus = new DrawTileFillStatus(this); uiEditGameWorldMenuWindow = new UIEditGameWorldMenuWindow( gs, onDatabaseButtonClicked, onSaveButtonClicked, onExitButtonClicked); }
public TileMapSpritesBase(GameSystem gs, GameWorldSystem gw, bool isEditor) { gameSystem = gs; gameWorld = gw; resourcePackageCache = gw.getResourceCache(); this.isEditor = isEditor; }
public TileMapSprites(GameSystem gs, GameWorldSystem gw, MapSpritesInfo msi, bool isEditor = false) : base(gs, gw, isEditor) { mapSpritesInfo = msi; tileSprite = new AutoTileSprite(tileWidth, tileHeight); int size = 4; selector = new SpriteRectangle() { color = Color.White, boundSize = size, size = new Size(tileWidth - size, tileHeight - size) }; resize(); }
public UIPlayerInfoPanel(GameSystem gs, GameWorldSystem gw, Point position) { gameSystem = gs; gameWorld = gw; var g = gs.gameGraphic; background = new SpriteRectangle() { position = position, color = Color.FromArgb(64, Color.Black), size = new Size(450, 36), isFill = true }; stName = new SpriteText() { position = new Point(position.X + 16, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(stName) }; stForce = new SpriteText() { position = new Point(position.X + 144, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(stForce) }; stHp = new SpriteText() { position = new Point(position.X + 272, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(stHp) }; }
public SceneGame(GameSystem gs, GameWorldSystem gw) : base(gs) { gameWorld = gw; tileMapStatus = new DefaultStatus(this); mapSpritesInfo = new TileMapSprites.MapSpritesInfo(gameWorld); zoomableTileMapSprites = new ZoomableTileMapSprites <TileMapSprites>(); addChild(zoomableTileMapSprites); uiPlayerInfoPanel = new UIPlayerInfoPanel(gameSystem, gameWorld, new Point(formMain.Width - 540, 30)); uiTileInfoPanel = new UITileInfoPanel(gameSystem, new Point(30, formMain.Height - 108)); addChild(uiPlayerInfoPanel); addChild(uiTileInfoPanel); loadMap(); }
public TileMapDetailSprites(GameSystem gs, GameWorldSystem gw, MapSpritesInfo msi, bool isEditor = false) : base(gs, gw, msi, isEditor) { var ti = gameWorldData.masterData.terrainImage; var list = ti.Values.ToList(); var rc = resourcePackageCache; terrainSprite = ti.Where(o => o.Value.animationDetail != null).ToDictionary(o => o.Key, o => new TileSpriteAnimation(o.Value.animationDetail)); terrainSpriteSpring = ti.Where(o => o.Value.animationDetailSpring != null).ToDictionary(o => o.Key, o => new TileSpriteAnimation(o.Value.animationDetailSpring)); terrainSpriteSummer = ti.Where(o => o.Value.animationDetailSummer != null).ToDictionary(o => o.Key, o => new TileSpriteAnimation(o.Value.animationDetailSummer)); terrainSpriteAutumn = ti.Where(o => o.Value.animationDetailAutumn != null).ToDictionary(o => o.Key, o => new TileSpriteAnimation(o.Value.animationDetailAutumn)); terrainSpriteWinter = ti.Where(o => o.Value.animationDetailWinter != null).ToDictionary(o => o.Key, o => new TileSpriteAnimation(o.Value.animationDetailWinter)); terrainSpriteSnow = ti.Where(o => o.Value.animationDetailSnow != null).ToDictionary(o => o.Key, o => new TileSpriteAnimation(o.Value.animationDetailSnow)); //strongholdSprite = mii.strongholdAnimation.ToDictionary(o => o.Key, o => new TileSpriteAnimation(o.Value)); list.ForEach(o => o.animationDetail?.ForEach(oo => rc.getTileMapImage(oo.fileName))); list.ForEach(o => o.animationDetailSpring?.ForEach(oo => rc.getTileMapImage(oo.fileName))); list.ForEach(o => o.animationDetailSummer?.ForEach(oo => rc.getTileMapImage(oo.fileName))); list.ForEach(o => o.animationDetailAutumn?.ForEach(oo => rc.getTileMapImage(oo.fileName))); list.ForEach(o => o.animationDetailWinter?.ForEach(oo => rc.getTileMapImage(oo.fileName))); list.ForEach(o => o.animationDetailSnow?.ForEach(oo => rc.getTileMapImage(oo.fileName))); //mii.strongholdAnimation.Values.ToList().ForEach(o => gameWorld.getImage(o.fileName)); }
public static ResourcePackageCache getResourceCache(this GameWorldSystem gw) => ResourceHelper.getResourcePackage(gw.resourcePackageName);
public MapSpritesInfo(GameWorldSystem gw) => gameWorld = gw;
public MapSpritesInfo(GameWorldSystem gw) : base(gw) { }