コード例 #1
0
        public Machine()
        {
            this.GamepadGlobal = new Gamepad();
            this.Gamepads      = new GamepadPool(10);

            this.videoMemory = new VideoMemory();
            this.BatteryRam  = new BatteryRam();
            this.Audio       = new Audio();
        }
コード例 #2
0
ファイル: Map.cs プロジェクト: samoteph/Sugoi
        public void Create(AssetMap map, VideoMemory videoMemory)
        {
            var surfaceTileSheet = videoMemory.GetSprite <SurfaceTileSheet>(map.AssetTileSheetName);

            this.Name      = map.Name;
            this.MapWidth  = map.MapWidth;
            this.MapHeight = map.MapHeight;
            this.Tiles     = new MapTileDescriptor[map.MapWidth * map.MapHeight];

            for (int index = 0; index < this.Tiles.Length; index++)
            {
                this.Tiles[index] = map.Tiles[index];
            }

            this.TileSheet = surfaceTileSheet;

            this.Width  = map.MapWidth * surfaceTileSheet.TileWidth;
            this.Height = map.MapHeight * surfaceTileSheet.TileHeight;
        }