예제 #1
0
        public override List <IRenderObject> GetRenderData()
        {
            ChangeButtonStates();

            List <IRenderObject> renderObjects = new List <IRenderObject>();

            foreach (Actor actor in Actors)
            {
                actor.RecalculateComponentsPositions();
                renderObjects.AddRange(actor.GetRenderObjects());
            }

            foreach (Actor actor in SymbolButtons)
            {
                actor.RecalculateComponentsPositions();
                renderObjects.AddRange(actor.GetRenderObjects());
            }

            if (PlayersManager.ValidateNewPlayer())
            {
                CreatePlayerButton.ButtonState = ButtonState.Active;
            }
            else
            {
                CreatePlayerButton.ButtonState = ButtonState.Inactive;
            }

            CreatePlayerButton.RecalculateComponentsPositions();
            renderObjects.AddRange(CreatePlayerButton.GetRenderObjects());

            ReturnButton.RecalculateComponentsPositions();
            renderObjects.AddRange(ReturnButton.GetRenderObjects());

            return(renderObjects);
        }