A game framework written with osu! in mind.
at master 33 lines 937 B view raw
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2// See the LICENCE file in the repository root for full licence text. 3 4using osu.Framework.Allocation; 5using osu.Framework.Graphics.Shapes; 6using osu.Framework.Graphics; 7using osu.Framework.Graphics.Textures; 8using osuTK; 9 10namespace osu.Framework.Tests.Visual.Sprites 11{ 12 public class TestSceneTexturedTriangle : FrameworkTestScene 13 { 14 public TestSceneTexturedTriangle() 15 { 16 Add(new TexturedTriangle 17 { 18 Anchor = Anchor.Centre, 19 Origin = Anchor.Centre, 20 Size = new Vector2(300, 150) 21 }); 22 } 23 24 private class TexturedTriangle : Triangle 25 { 26 [BackgroundDependencyLoader] 27 private void load(TextureStore textures) 28 { 29 Texture = textures.Get(@"sample-texture"); 30 } 31 } 32 } 33}