public void Update(ViewController view, Combat.Tree tree) { base.Update(view); this.tree = tree; this.view = view; tree.Parent.Traverse(tree.Parent, UpdateForce); }
public void Render(SpriteBatch spriteBatch, ViewController view, Combat.Tree tree) { _spriteBatch = spriteBatch; base.Render(spriteBatch, view); tree.Parent.Traverse(tree.Parent, RenderForce); if (currentlySelectedForce != null) { spriteBatch.DrawString(Assets.ARJULIAN, $"{currentlySelectedForce.Name}", new Vector2(0, 5), Color.White); } if (isResizing) { spriteBatch.DrawString(Assets.ARJULIAN, $"Is resizing", new Vector2(0, 5), Color.White); } }
public ForceOrganizerState(GameManager gameManager, GraphicsDevice graphicsDevice, ContentManager contentManager) : base(gameManager, graphicsDevice, contentManager) { this.gameManager = gameManager; this.graphicsDevice = graphicsDevice; SpriteBatch = new SpriteBatch(graphicsDevice); viewController = new MenuViewController(); GameManager.graphics.PreferredBackBufferWidth = GameManager.window.ClientBounds.Width; GameManager.graphics.PreferredBackBufferHeight = GameManager.window.ClientBounds.Height; viewController.viewPortWidth = GameManager.window.ClientBounds.Width; viewController.viewPortHeight = GameManager.window.ClientBounds.Height; GameManager.graphics.ApplyChanges(); // I'm not questioning why this works. I, Cato Sicarius, approve of this action, because I, Cato Sicarius, am the most well versed Captain when it comes to the Codex Astartes! screen = new ForceOrganizerScreen(0, "spr_rock_bg_0", new MapFrameAlign(0, 0, 0, 0), false); screen.primitive = new PrimitiveBuddy.Primitive(graphicsDevice, SpriteBatch); tree = new Combat.Tree(); tree.Parent = new Force("HQ", 400, 20); tree.Parent.AddChildren(new Force("Deathwing Inner Circle", 200, 100).AddChildren(new Force("1st Coy. 'Deathwing'", 200, 280)), new Force("Ravenwing Inner Circle", 600, 100).AddChildren(new Force("2nd Coy. 'Ravenwing'", 600, 280))); }