public QuantityPopup init(EquipmentsMarket market) { this.market = market; asLoot = false; init(); return(this); }
public void setEnabled(Type type, InventoryContainedScreen container) { this.inventoryType = type; enabled = true; if (container != null && (type == Type.MARKET_BUY || type == Type.MARKET_SELL)) { market = (EquipmentsMarket)container; } else { market = null; } }
// private AnnouncementScreen announcementScreen; void Awake() { Vars.initVars(); Vars.inSpace = false; ItemFactory.itemPrefab = itemPrefab; Imager.initialize(); Player.init(); GameObject.Find("Images Provider").GetComponent <ImagesProvider>().init(); background = transform.Find("Background").GetComponent <Background>().init(); // announcementsBtn = transform.Find("Announcements Button").GetComponent<Button>().init(); marketBtn = transform.Find("Market Button").GetComponent <Button>().init(); hangarBtn = transform.Find("Hangar Button").GetComponent <Button>().init(); // industrialBtn = transform.Find("Industrial Button").GetComponent<Button>().init(); leaveBtn = transform.Find("Leave Button").GetComponent <Button>().init(); btns = new Button[] { marketBtn, hangarBtn, leaveBtn }; //announcementsBtn, industrialBtn, PlanetSurface.topHideable = this; ItemDescriptor descriptor = GameObject.Find("Item Descriptor").GetComponent <ItemDescriptor>().init(); statusScreen = GameObject.Find("Status Screen").GetComponent <StatusScreen>().init(null, descriptor); descriptor.playerData = statusScreen.playerData; Vars.userInterface = GameObject.FindGameObjectWithTag("UserInterface").GetComponent <UserInterface>().init(statusScreen); // messageBox = GameObject.Find("Message Box").GetComponent<MessageBox>(); story = GameObject.Find("Story Teller").GetComponent <Story>().init(this); // announcementScreen = GameObject.Find("Announcement Screen").GetComponent<AnnouncementScreen>().init(this, statusScreen.cabin); exploreScreen = GameObject.Find("Explore Screen").GetComponent <ExploreScreen>().init(this, statusScreen, descriptor); market = GameObject.Find("Equipments Market").GetComponent <EquipmentsMarket> ().init(this, statusScreen.inventory, descriptor); hangarScreen = GameObject.Find("Hangar Screen").GetComponent <HangarScreen>().init(this, statusScreen.inventory, statusScreen.shipData); // industrialScreen = GameObject.Find("Industrial Screen").GetComponent<IndustrialScreen>().init(this); // messageBox.init(this); if (Vars.shipCurrentHealth == -1) { startNewGame(); } landPlanet(); }