当前位置: 首页>>代码示例>>C#>>正文


C# Quest.IsCompleted方法代码示例

本文整理汇总了C#中Quest.IsCompleted方法的典型用法代码示例。如果您正苦于以下问题:C# Quest.IsCompleted方法的具体用法?C# Quest.IsCompleted怎么用?C# Quest.IsCompleted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Quest的用法示例。


在下文中一共展示了Quest.IsCompleted方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SerializeQuest

		internal static void SerializeQuest(ServerMessage Message, GameClient Session, Quest Quest, string Category)
		{
			if (Message == null || Session == null)
			{
				return;
			}
			int amountOfQuestsInCategory = MercuryEnvironment.GetGame().GetQuestManager().GetAmountOfQuestsInCategory(Category);
			checked
			{
				int num = (Quest == null) ? amountOfQuestsInCategory : (Quest.Number - 1);
				int num2 = (Quest == null) ? 0 : Session.GetHabbo().GetQuestProgress(Quest.Id);
				if (Quest != null && Quest.IsCompleted(num2))
				{
					num++;
				}
				Message.AppendString(Category);
				Message.AppendInt32((Quest == null) ? 0 : (Quest.Category.Contains("xmas2012") ? 0 : num));
				Message.AppendInt32((Quest == null) ? 0 : (Quest.Category.Contains("xmas2012") ? 0 : amountOfQuestsInCategory));
				Message.AppendInt32((Quest == null) ? 3 : Quest.RewardType);
				Message.AppendUInt((Quest == null) ? 0u : Quest.Id);
				Message.AppendBoolean(Quest != null && Session.GetHabbo().CurrentQuestId == Quest.Id);
				Message.AppendString((Quest == null) ? string.Empty : Quest.ActionName);
				Message.AppendString((Quest == null) ? string.Empty : Quest.DataBit);
				Message.AppendInt32((Quest == null) ? 0 : Quest.Reward);
				Message.AppendString((Quest == null) ? string.Empty : Quest.Name);
				Message.AppendInt32(num2);
				Message.AppendUInt((Quest == null) ? 0u : Quest.GoalData);
				Message.AppendInt32((Quest == null) ? 0 : Quest.TimeUnlock);
				Message.AppendString("");
				Message.AppendString("");
				Message.AppendBoolean(true);
			}
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:33,代码来源:QuestListComposer.cs

示例2: SerializeQuest

        /// <summary>
        ///     Serializes the quest.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="session">The session.</param>
        /// <param name="quest">The quest.</param>
        /// <param name="category">The category.</param>
        internal static void SerializeQuest(ServerMessage message, GameClient session, Quest quest, string category)
        {
            if (message == null || session == null)
            {
                return;
            }
            var amountOfQuestsInCategory = Yupi.GetGame().GetQuestManager().GetAmountOfQuestsInCategory(category);

            {
                var num = quest == null ? amountOfQuestsInCategory : quest.Number - 1;
                var num2 = quest == null ? 0 : session.GetHabbo().GetQuestProgress(quest.Id);
                if (quest != null && quest.IsCompleted(num2))
                {
                    num++;
                }
                message.AppendString(category);
                message.AppendInteger(quest == null ? 0 : (quest.Category.Contains("xmas2012") ? 0 : num));
                message.AppendInteger(quest == null
                    ? 0
                    : (quest.Category.Contains("xmas2012") ? 0 : amountOfQuestsInCategory));
                message.AppendInteger(quest?.RewardType ?? 3);
                message.AppendInteger(quest?.Id ?? 0);
                message.AppendBool(quest != null && session.GetHabbo().CurrentQuestId == quest.Id);
                message.AppendString(quest == null ? string.Empty : quest.ActionName);
                message.AppendString(quest == null ? string.Empty : quest.DataBit);
                message.AppendInteger(quest?.Reward ?? 0);
                message.AppendString(quest == null ? string.Empty : quest.Name);
                message.AppendInteger(num2);
                message.AppendInteger(quest?.GoalData ?? 0u);
                message.AppendInteger(quest?.TimeUnlock ?? 0);
                message.AppendString(string.Empty);
                message.AppendString(string.Empty);
                message.AppendBool(true);
            }
        }
开发者ID:sgf,项目名称:Yupi,代码行数:42,代码来源:QuestListComposer.cs

示例3: StartTimer

    IEnumerator StartTimer(Quest q)
    {
        DebugOnScreen.Log ("Starting timer for " + q.GetTimerLength() + " seconds.");

        yield return new WaitForSeconds ((float)q.GetTimerLength());

        if (q.IsCompleted () == false) {
            q.Fail();
            UpdateQuests();
        } else {
            UpdateQuests();
        }
    }
开发者ID:chicostategamestudios,项目名称:qk-pop,代码行数:13,代码来源:QuestManager.cs


注:本文中的Quest.IsCompleted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。