internal void RemoveDeadUnits() { var numberRemoved = StackViewsList.RemoveAll(stackView => stackView.Count == 0); if (numberRemoved > 0) { Stacks.RemoveDeadUnits(); } }
internal void LoadContent(ContentManager content) { var atlas = AssetsManager.Instance.GetAtlas("Squares"); GuiTextures = AssetsManager.Instance.GetTexture("Squares"); SquareGreenFrame = atlas.Frames["SquareGreen"]; SquareGrayFrame = atlas.Frames["SquareGray"]; UnitAtlas = AssetsManager.Instance.GetAtlas("Units"); UnitTextures = AssetsManager.Instance.GetTexture("Units"); foreach (var stack in Stacks) { //CreateNewStackView(WorldView, stack, Input); var stackView = new StackView.StackView(WorldView, this, stack, Input); stackView.LoadContent(content); StackViewsList.Add(stackView); } }
private void CreateNewStackView(WorldView worldView, PhoenixGameLibrary.Stack stack, InputHandler input) { var stackView = new StackView.StackView(worldView, this, stack, input); StackViewsList.Add(stackView); }