Esempio n. 1
0
        internal void RemoveDeadUnits()
        {
            var numberRemoved = StackViewsList.RemoveAll(stackView => stackView.Count == 0);

            if (numberRemoved > 0)
            {
                Stacks.RemoveDeadUnits();
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        private void CreateNewStackView(WorldView worldView, PhoenixGameLibrary.Stack stack, InputHandler input)
        {
            var stackView = new StackView.StackView(worldView, this, stack, input);

            StackViewsList.Add(stackView);
        }