Beispiel #1
0
 /*
  * Contructor for Masterpage, initialize all components and BindingContext
  *
  * PARAM
  * page: encapsulate page
  * user: encapsulate user
  * items: encapsulate items
  * weapon: encapsulate weapon
  * truth: encapsulate truth
  * mainpage: encapsulate mainpage
  * ContentPage: encapsulate display
  *
  * RETURNS Nothing
  */
 public MasterPageViewModel(Page page, UserModel user, InventoryItemsModel items, WeaponInfoModel weapon, logged truth,
                            MasterPageView mainpage, ContentPage display, DungeonView dungeon, ItemInfoModel ItemInv, ShopModel Shop, CharacterInfoModel Characters)
 {
     this.page       = page;
     this.user       = user;
     this.items      = items;
     this.truth      = truth;
     this.weapon     = weapon;
     this.ItemInv    = ItemInv;
     this.Characters = Characters;
     this.mainpage   = mainpage;
     this.dungeon    = dungeon;
     this.Shop       = Shop;
     weapon.SetWeaponAsync(display, UserModel.CheckForstring(items.Localfile, "Equipped:"));
     Tasks_Clicked     = new Command(async() => await TaskNavAsync());
     Inventory_Clicked = new Command(async() => await InventoryNavAsync());
     Dungeon_Clicked   = new Command(async() => await DungeonNavAsync());
     About_Clicked     = new Command(async() => await AboutNavAsync());
     Settings_Clicked  = new Command(async() => await SettingsNavAsync());
     Stats_Clicked     = new Command(async() => await StatsNavAsync());
     Shop_Clicked      = new Command(async() => await ShopNavAsync());
     PageOn            = new PageOpenModel();
     PageOn.Tasks      = true;
     dungeon.Shop      = this.Shop;
 }
Beispiel #2
0
    public void EnableDungeonView(Dungeon d)
    {
        if (currentlyDisplayedDungeonView)
        {
            currentlyDisplayedDungeonView.setDisplay(null, false);
        }

        currentlyDisplayedDungeonView = dungeonToDungeonView[d];
        dungeonViewCanvas.enabled     = true;
        currentlyDisplayedDungeonView.setDisplay(d, true);
    }
Beispiel #3
0
        logged truth = new logged();// Used for telling threads of the application to stop running whenever this is false

        /*
         * Initialize all components and classes for traversing through both details page and masterpage
         * PARAM
         * user: the user data
         * items: the items data
         * RETURNS Nothing
         */
        public AddView(UserModel user, InventoryItemsModel items, StatsModel stats)
        {
            InitializeComponent();
            WeaponInfoModel    weapon      = new WeaponInfoModel(items);
            ItemInfoModel      Invitem     = new ItemInfoModel(items);
            CharacterInfoModel Characters  = new CharacterInfoModel(items, user.LocalLogin);
            ShopModel          Shop        = new ShopModel(items);
            DungeonModel       realDungeon = new DungeonModel();

            Xamarin.Forms.NavigationPage.SetHasNavigationBar(this, false);
            DungeonView dungeon = new DungeonView(user, items, weapon, Invitem, stats, false, realDungeon);

            this.Detail = new NavigationPage(new TasksView(user, items, truth, dungeon, new InventoryView(items, weapon, user, Invitem, Characters))); // Set Detailspage arguments with user information and truth value.
            this.Master = new MasterPageView(Detail, user, items, weapon, truth, dungeon, Invitem, Shop, Characters);                                  // set the masterpage information with user, items, and truth values.
        }
Beispiel #4
0
    void Awake()
    {
        mState = eControllerState.eControllerState_CREATED;

        mDungeonView = this.gameObject.GetComponent <DungeonView>();
        if (mDungeonView == null)
        {
            mDungeonView = this.gameObject.AddComponent <DungeonView>();
        }

        mDungeonModel = this.gameObject.GetComponent <DungeonModel>();
        if (mDungeonModel == null)
        {
            mDungeonModel = this.gameObject.AddComponent <DungeonModel>();
        }

        m_questingParties = new Dictionary <string, GameObject>();
    }
Beispiel #5
0
 private void Awake()
 {
     Instance = this;
 }