public void CheckCondition(QuestMessage msg) { switch (TypeOfCondition) { case ConditionType.Custom: if (msg.CustomCondition == CustomCondition) QuestMaker.Instance.NextQuest(); break; } }
private void ShowMessageFromStack() { if (messagesToShow.Count == 0) { return; } QuestMessage msg = messagesToShow.Dequeue(); StartCoroutine(Lifetime(msg.text, msg.progress, msg.goal)); }
public void ShowMessage(string message, int progress, int goal) { QuestMessage msg = new QuestMessage(message, progress, goal); messagesToShow.Enqueue(msg); if (canvasGroup.alpha == 0 && messagesToShow.Count == 1) { ShowMessageFromStack(); } }
public void TestCustomRW() { QuestMessage message = new QuestMessage { quest = new MockQuest(100) }; byte[] data = MessagePackingTest.PackToByteArray(message); QuestMessage unpacked = MessagePackingTest.UnpackFromByteArray <QuestMessage>(data); Assert.That(unpacked.quest.Id, Is.EqualTo(100)); }
public void TestCustomRW() { QuestMessage message = new QuestMessage() { quest = new MockQuest(100) }; byte[] data = MessagePacker.Pack(message); QuestMessage unpacked = MessagePacker.Unpack <QuestMessage>(data); Assert.That(unpacked.quest.Id, Is.EqualTo(100)); }
public QuestMessage CloneMessage() { QuestMessage result = new QuestMessage(); foreach (var pair in mMessage) { result.Add( pair.Key, new List <string>(pair.Value.Select((s) => s)) ); } return(result); }
public StellarQuestMessage(QuestMessage message, Milestone milestoneData = null, Mission missionData = null) { Message = message; MilestoneData = milestoneData; MissionData = missionData; }