private void load() { sim = new RigidBodySimulation { RelativeSizeAxes = Axes.Both }; Resources.AddStore(new DllResourceStore(@"Gale.dll")); dependencies.Cache(Fonts = new FontStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Regular"))); Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-RegularItalic")); sim.Add(new Player()); base.Content.Add(new GaleKeyBindingContainer { sim }); }
private void performDropCube() { // Add a new cube to the simulation RigidBodyContainer <Drawable> rbc = new RigidBodyContainer <Drawable> { Child = new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(150, 150), Colour = Color4.Tomato, }, Position = new Vector2(500, 500), Size = new Vector2(200, 200), Rotation = 45, Colour = Color4.Tomato, Masking = true, }; sim.Add(rbc); }
private void load() { Child = sim = new RigidBodySimulation { RelativeSizeAxes = Axes.Both }; RigidBodyContainer <Drawable> rbc = new RigidBodyContainer <Drawable> { Child = new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(150, 150), Colour = Color4.Tomato, }, Position = new Vector2(500, 500), Size = new Vector2(200, 200), Rotation = 45, Colour = Color4.Tomato, Masking = true, }; sim.Add(rbc); }
private void DropCube() { Child = sim = new RigidBodySimulation { RelativeSizeAxes = Axes.Both }; RigidBodyContainer <Drawable> rbc = new RigidBodyContainer <Drawable> { Child = new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(150, 150), Texture = texture, }, Position = new Vector2(500, 500), Size = new Vector2(200, 200), Rotation = 45, Masking = true, }; sim.Add(rbc); FillFlowContainer flow; AddRange(new Drawable[] { new ScrollContainer { RelativeSizeAxes = Axes.Both, Children = new[] { flow = new FillFlowContainer { Anchor = Anchor.TopLeft, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Direction = FillDirection.Vertical, } } } }); SpriteText test = new SpriteText { Text = @"You are now entering completely darkness...", Font = "Exo2.0-Regular", AllowMultiline = true, RelativeSizeAxes = Axes.X, TextSize = 25 }; flow.Add(test); flow.Add(new SpriteText { Text = @"That just used the font " + test.Font + "!", Font = "Exo2.0-RegularItalic", AllowMultiline = true, RelativeSizeAxes = Axes.X, TextSize = 25 }); }