コード例 #1
0
    protected override void ChestOpened()
    {
        if (this.sender == null)
        {
            return;
        }

        var message = hasBeenOpened ? "This chest is empty." : "You found $20!";
        var dialog  = new TransientDialog(message);

        if (hasBeenOpened)
        {
            this.sender.ShowDialog(dialog);
        }
        else
        {
            this.sender.InventoryAcquiredNotification(dialog).ContinueWithOnMainThread
            (
                (e) =>
            {
                ourQuestSection.Objectives[0].IsDone = true;
                this.sender.HUD.QuestCompleted(ourQuest);
                this.ClearSender();
                //TODO: Quest Completed here.
            }
            );
        }
    }
コード例 #2
0
ファイル: GTwinChest.cs プロジェクト: ZeroWR/AerandyrGame
    protected override void ChestOpened()
    {
        if (this.sender == null)
        {
            return;
        }
        ourQuestSection.Objectives[1].IsDone = true;
        var message = hasBeenOpened ? "This chest is empty." : "You got Gershigglefertz's item!";
        var dialog  = new TransientDialog(message);

        if (hasBeenOpened)
        {
            this.sender.ShowDialog(dialog);
        }
        else
        {
            this.sender.InventoryAcquiredNotification(dialog).ContinueWithOnMainThread
            (
                (e) =>
            {
                ourQuest.CurrentSection = ourQuest.Sections[2];
                this.ClearSender();
            }
            );
        }
    }