示例#1
0
 public BuildingUI(BuildingCollectionUI ctx, IBuilding building, RectangleShape shape, Vector2f pos, MapTypes type)
 {
     Shape = shape ?? throw new ArgumentNullException(nameof(shape));
     CtxBuildingCollectionUi = ctx;
     Pos           = pos;
     BuildingCtx   = building;
     Menu          = new ContextualMenu(this);
     DrawMenuState = false;
     MapTypes      = type;
 }
示例#2
0
        public FarmUI(GameLoop ctx)
        {
            FarmOptionsUI = new FarmOptionsUI(this);
            Farm          = new Farm();


            Farm.Buildings.Build <Henhouse>(600, 740);
            Farm.Buildings.Build <EggStorage>(800, 740);


            CtxGame = ctx;
            BuildingCollectionUI = new BuildingCollectionUI(this);
            PlayerUI             = new PlayerUI(this, Farm.Player);

            Font font = new Font(FontLocation);

            Text = new Text("", font);



            //ButtonSellEggs = new RectangleShape( _buttonSize ) { Position = _buttonPos };
        }