示例#1
0
        public static void Main(string[] args)
        {
            DisplayWelcomeMessage();
            Warehouse        warehouse        = Warehouse.FromFile(new WarehouseReader("../warehouse.dat"));
            Catalogue        catalogue        = Catalogue.FromFile(new CatalogueReader("../catalogue.dat"));
            Basket           basket           = new Basket();
            CatalogueActions catalogueActions = new CatalogueActions(catalogue);
            WarehouseActions warehouseActions = new WarehouseActions(warehouse, catalogue);
            BasketActions    basketActions    = new BasketActions(basket, catalogue, warehouse);

            new UserInterface(catalogueActions, warehouseActions, basketActions).Start();
            DisplayGoodbyeMessage();
            Environment.Exit(0);
        }
    void Start()
    {
        _gameData         = this.gameObject.GetComponent <GameData> ();
        _homeManager      = this.gameObject.GetComponentInChildren <HomeManager> ();
        _warehouseActions = this.gameObject.GetComponentInChildren <WarehouseActions> ();
        _floating         = this.gameObject.GetComponentInChildren <FloatingActions> ();
        _backpackActions  = this.gameObject.GetComponentInChildren <BackpackActions> ();

        commonTipText   = commonTipPanel.gameObject.GetComponentsInChildren <Text> ();
        commonTipButton = commonTipPanel.gameObject.GetComponentsInChildren <Button> ();

        buildTipText   = buildTip.gameObject.GetComponentsInChildren <Text> ();
        buildTipButton = buildTip.gameObject.GetComponentsInChildren <Button> ();

        makingTipText   = MakingTip.gameObject.GetComponentsInChildren <Text> ();
        makingTipButton = MakingTip.gameObject.GetComponentsInChildren <Button> ();

        techTipText   = TechTip.gameObject.GetComponentsInChildren <Text> ();
        techTipButton = TechTip.gameObject.GetComponentsInChildren <Button> ();
    }
示例#3
0
 public UserInterface(CatalogueActions catalogueActions, WarehouseActions warehouseActions, BasketActions basketActions)
 {
     this.catalogueActions = catalogueActions;
     this.warehouseActions = warehouseActions;
     this.basketActions    = basketActions;
 }