public SampleBrowserLayer(ISample[] samples) { items = new List <SampleItem>(); var font = Engine.Graphics.CreateDynamicFont("", 12, new Color(255, 255, 255, 255), 1, new Color(0, 0, 0, 255)); int index = 0; foreach (var sample in samples) { var item = new SampleItem(sample, font); var x = ItemOffset.X * (index % Columns) + 8; var y = ItemOffset.Y * (index / Columns) + 8 + 20; item.Position = new Vector2DF(x, y); AddObject(item); items.Add(item); ++index; } camera = new CameraObject2D() { Src = new RectI(0, 0, 640, 480), Dst = new RectI(0, 0, 640, 480), }; AddObject(camera); }
public PlayLayer(int i) { Player = Game.Player[i]; Score = Game.Score.Notes[Player.Difficulty]; // レーンの背景の配置 AddObject(new TextureObject2D { Texture = Engine.Graphics.CreateTexture2D("Graphics/Lane_Back.png"), Position = new Vector2DF(310 * i + 40, 120), DrawingPriority = 0 }); // コンボテキストの配置 AddObject(new ComboText(i + 1) { DrawingPriority = 10 }); // レーンの境目の配置 AddObject(new TextureObject2D { Texture = Engine.Graphics.CreateTexture2D("Graphics/Lane_Border.png"), Position = new Vector2DF(310 * i + 40, 120), DrawingPriority = 2 }); // カメラの追加 CameraObject2D camera = new CameraObject2D(); camera.Src = new RectI(310 * i + 40, 120, 270, 450); camera.Dst = new RectI(310 * i + 40, 120, 270, 450); AddObject(camera); n = i; }