private void Start() { instance = this; foreach (Transform t in StoreInventory) { GameObject go = Instantiate(itemPrefab); go.transform.SetParent(t); go.GetComponent <DragItem>().Item = ItemLoader.instance.getItem(3); } }
public void ShowStore(string name) { if (storePrefabInstance != null) { storePrefabInstance.ExitStore(); } storePrefabInstance = Instantiate(storePrefab); storePrefabInstance.UseStore(name); }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); StoreRestServiceProxy serviceProxy = new StoreRestServiceProxy(); try { serviceProxy.StartService(); } catch (Exception e) { Console.WriteLine(e); Console.WriteLine("Error starting service"); Console.ReadLine(); return; } StoreGUI storeGui = new StoreGUI(serviceProxy); Application.Run(storeGui); }
protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); this.basicFont = Content.Load <SpriteFont>("Fonts/basicFont"); this.gameOverFont = Content.Load <SpriteFont>("Fonts/gameOverFont"); this.bar = Content.Load <Texture2D>("HUD/bar"); this.heroInventory.LoadContent(Content); this.menu.LoadContent(Content); this.pause.LoadContent(Content); this.fight.LoadContent(Content); this.LoadLevels(Content); this.storeGUI = new StoreGUI(hero); this.storeGUI.LoadContent(Content); }