コード例 #1
0
 public void CheckCondition(QuestMessage msg)
 {
     switch (TypeOfCondition)
     {
         case ConditionType.Custom:
             if (msg.CustomCondition == CustomCondition)
                 QuestMaker.Instance.NextQuest();
             break;
     }
 }
コード例 #2
0
    private void ShowMessageFromStack()
    {
        if (messagesToShow.Count == 0)
        {
            return;
        }

        QuestMessage msg = messagesToShow.Dequeue();

        StartCoroutine(Lifetime(msg.text, msg.progress, msg.goal));
    }
コード例 #3
0
    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();
        }
    }
コード例 #4
0
        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));
        }
コード例 #5
0
ファイル: CustomRWTest.cs プロジェクト: hufs-vrr/vrr
        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));
        }
コード例 #6
0
        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);
        }
コード例 #7
0
 public StellarQuestMessage(QuestMessage message, Milestone milestoneData = null, Mission missionData = null)
 {
     Message       = message;
     MilestoneData = milestoneData;
     MissionData   = missionData;
 }