示例#1
0
 public override void ViewDidAppear(bool animated)
 {
     base.ViewDidAppear(animated);
     UpdatePreview(0);
     UpdateStatsDisplay();
     EquipmentTableView.ReloadData();
     PackTableView.ReloadData();
 }
示例#2
0
        partial void EquipUseButton_TouchUpInside(UIButton sender)
        {
            ItemBase item = player.bag[PackTableView.IndexPathForSelectedRow.Row];

            if (item.itemType != ItemBase.ItemType.Consumable)
            {
                bool replaced = false;
                foreach (var i in player.equipment)
                {
                    if (i.itemType == item.itemType)
                    {
                        replaced = true;

                        player.bag.Add(i);
                        player.equipment.Remove(i);
                        player.equipment.Add(item);
                        player.bag.Remove(item);

                        EquipmentTableView.ReloadData();
                        PackTableView.ReloadData();
                        break;
                    }
                }
                if (!replaced)
                {
                    player.equipment.Add(item);
                    EquipmentTableView.ReloadData();

                    player.bag.Remove(item);
                    PackTableView.ReloadData();
                }
            }
            else
            {
                player.bag.Remove(item);
                PackTableView.ReloadData();
                player.drinkPotion((ConsumableBase)item);
            }
            UpdatePreview(0);
            player.UpdateStats();
            UpdateStatsDisplay();
            EquipmentTableView.ReloadData();
            PackTableView.ReloadData();
        }
示例#3
0
        void ReleaseDesignerOutlets()
        {
            if (EquipmentTableView != null)
            {
                EquipmentTableView.Dispose();
                EquipmentTableView = null;
            }

            if (EquipUseButton != null)
            {
                EquipUseButton.Dispose();
                EquipUseButton = null;
            }

            if (ItemPreviewEffect1Text != null)
            {
                ItemPreviewEffect1Text.Dispose();
                ItemPreviewEffect1Text = null;
            }

            if (ItemPreviewEffect2Text != null)
            {
                ItemPreviewEffect2Text.Dispose();
                ItemPreviewEffect2Text = null;
            }

            if (ItemPreviewImage != null)
            {
                ItemPreviewImage.Dispose();
                ItemPreviewImage = null;
            }

            if (ItemPreviewTitle != null)
            {
                ItemPreviewTitle.Dispose();
                ItemPreviewTitle = null;
            }

            if (PackTableView != null)
            {
                PackTableView.Dispose();
                PackTableView = null;
            }

            if (StatsHPText != null)
            {
                StatsHPText.Dispose();
                StatsHPText = null;
            }

            if (StatsLevelText != null)
            {
                StatsLevelText.Dispose();
                StatsLevelText = null;
            }

            if (StatsMAttackText != null)
            {
                StatsMAttackText.Dispose();
                StatsMAttackText = null;
            }

            if (StatsMaxHPText != null)
            {
                StatsMaxHPText.Dispose();
                StatsMaxHPText = null;
            }

            if (StatsMaxStamText != null)
            {
                StatsMaxStamText.Dispose();
                StatsMaxStamText = null;
            }

            if (StatsMDefenseText != null)
            {
                StatsMDefenseText.Dispose();
                StatsMDefenseText = null;
            }

            if (StatsPAttackText != null)
            {
                StatsPAttackText.Dispose();
                StatsPAttackText = null;
            }

            if (StatsPDefenseText != null)
            {
                StatsPDefenseText.Dispose();
                StatsPDefenseText = null;
            }

            if (StatsStamText != null)
            {
                StatsStamText.Dispose();
                StatsStamText = null;
            }

            if (StatsXPNextText != null)
            {
                StatsXPNextText.Dispose();
                StatsXPNextText = null;
            }

            if (StatsXPText != null)
            {
                StatsXPText.Dispose();
                StatsXPText = null;
            }
        }