本文整理汇总了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);
}
}
示例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);
}
}
示例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();
}
}