コード例 #1
0
        /// <summary>
        /// Returns a Bitmap representing the Castle to be used in the game.
        /// </summary>
        /// <returns>The Castle Bitmap.</returns>
        public static Bitmap CreateCastleImg()
        {
            Bitmap result = SwinGame.CreateBitmap(CASTLE_WIDTH, CASTLE_HEIGHT);

            SwinGame.ClearSurface(result, SwinGame.RGBAColor(50, 50, 40, 140));

            return(result);
        }
コード例 #2
0
        /// <summary>
        /// Returns a Bitmap representing a Freezing Bullet.
        /// </summary>
        /// <returns>The freezing bullet Bitmap.</returns>
        public static Bitmap CreateFreezingBulletImg()
        {
            Bitmap result = SwinGame.CreateBitmap(FREEZING_BULLET_SIZE, FREEZING_BULLET_SIZE);

            SwinGame.ClearSurface(result, Color.DarkTurquoise);

            return(result);
        }
コード例 #3
0
ファイル: TileMap.cs プロジェクト: 101584958/Platformer
        public TileMap(string tmxPath, EntityManager entityManager)
        {
            _map = new TmxMap(tmxPath);

            _bitmap = SwinGame.CreateBitmap(_map.Width * _map.TileWidth, _map.Height * _map.TileHeight);
            SwinGame.ClearSurface(_bitmap, Color.Cyan);

            Bitmap background = SwinGame.LoadBitmap(@"Resources\background.png");

            SwinGame.DrawBitmap(_bitmap, background, 0, 0);

            Dictionary <TmxTileset, Bitmap> tilesetBitmaps = LoadTilesetBitmaps(_map);

            DrawLayersToBitmap(_map, tilesetBitmaps);

            FreeTilesetBitmaps(tilesetBitmaps);

            LoadEntities(entityManager);
        }