Exemple #1
0
        public PlayerQuestUI(Vector2 position, GameManager gameManager, GameDevice gameDevice)
        {
            this.offsetPosition = position;
            this.gameManager    = gameManager;
            input     = gameDevice.InputState;
            renderer  = gameDevice.Renderer;
            enemyName = gameManager.EnemyName;
            enemyName.Load();
            itemManager = gameManager.ItemManager;
            playerQuest = gameManager.PlayerQuest;
            playerQuest.UpdateQuestProcess();

            quests = playerQuest.CurrentQuest();
            InitButtons();
            currentQuest = -1;
        }
Exemple #2
0
        private void InitCurrentInfo()
        {
            Quest currentQuestInfo = playerQuest.CurrentQuest()[currentQuest];

            if (currentQuestInfo is CollectQuest)
            {
                for (int i = 0; i < currentQuestInfo.RequireID().Length; i++)
                {
                    int id     = currentQuestInfo.RequireID()[i];
                    int amount = 0;
                    if (gameManager.PlayerItem.DepositoryItem().ContainsKey(id))
                    {
                        amount += gameManager.PlayerItem.DepositoryItem()[id];
                    }

                    currentQuestInfo.SetItemAmount(id, amount);
                }
            }
            currentQuestInfo.CheckClear();
        }