/*
  * The contructor for the game class/page
  * Param dungeon: parse the dungeon class object.
  * Returns Nothing.
  */
 public GameView(DungeonView dungeon)
 {
     this.dungeon       = dungeon;
     this.BossHP        = this.dungeon.boss.Health;
     this.CharacterHP   = dungeon.stats.Health;
     this.CharacterMP   = dungeon.stats.Mana;
     this.MagicPage     = false;
     this.lowestdamage  = Convert.ToInt32((this.dungeon.boss.Health) * .1);
     this.highestdamage = Convert.ToInt32((this.dungeon.boss.Health) * .2);
     pots = dungeon.itemInv.pots;
     InitializeComponent();
     InitializeStats();
     InitializeItems();
 }
Exemple #2
0
        /*
         * Contructor for DetailsPage to encapsulate current user information and truth value
         *
         * PARAM
         * user: parse the user to be used within this class
         * truth: parse truth to notify Device.StartTimer to stop whenever truthtime is off
         * items: parse items model
         * dungeon: parse dungeon object to open tutorial page.
         *
         * RETURN Nothing
         */
        public TasksView(UserModel user, InventoryItemsModel items, logged truth, DungeonView dungeon, InventoryView Inventory)
        {
            this.Currentuser = user;
            this.items       = items;
            this.truthtime   = truth;
            this.dungeon     = dungeon;
            this.inventory   = Inventory;
            TasksViewModel VM = new TasksViewModel(user, this)
            {
                Navigation = Navigation
            };

            BindingContext = VM;
            InitializeComponent();
        }
 /*
  * Contructor for Masterpage, initialize all components and BindingContext
  *
  * PARAM
  * page: encapsulate page
  * user: encapsulate user
  * items: encapsulate items
  * weapon: encapsulate weapon
  * truth: encapsulate truth
  *
  * RETURNS Nothing
  */
 public MasterPageView(Page page, UserModel user, InventoryItemsModel items, WeaponInfoModel weapon,
                       logged truth, DungeonView dungeon, ItemInfoModel itemInv, ShopModel Shop, CharacterInfoModel Characters)
 {
     InitializeComponent();
     BindingContext = new MasterPageViewModel(page, user, items, weapon, truth, this, this, dungeon, itemInv, Shop, Characters);
 }