//initialiserar de flesta underklasser och fyller i texturer och annat public Player(Game1 g) { game = g; unitset = game.Content.Load <Texture2D>("units2"); unitmenu = new UnitMenu(game, Vector2.Zero, this); castlemenu = new CastleMenu(game); hover = new Color(255, 255, 255); Trange = game.Content.Load <Texture2D>("RangeMark"); //range=new int[32,32]; currentUnit = -1; shop = new Shop(this, game); hit = game.Content.Load <Texture2D>("Hit"); marker = new Marker(game, 1000 / 4); //marker.Position = new Vector2(64, 64); }
//visar och gömmer soldatmenyn public void ShowUnitMenu(Vector2 pPos) { unitmenu = new UnitMenu(game, pPos, this); //unitmenu.Initialize(pPos,this); unitmenu.visible = true; }