コード例 #1
0
ファイル: Quest.cs プロジェクト: ShaDream/VoidTime
 public string GetInfo()
 {
     return($"Reward: {Reward}\n" +
            $"QuestStatus: {Status.ToString()}\n" +
            $"Enemy Difficult: {Difficult.ToString()}\n" +
            $"Enemy Count: {Count.ToString()}\n");
 }
コード例 #2
0
ファイル: Quest.cs プロジェクト: rwth-acis/GaMR
    public string ToJson()
    {
        JsonQuest jsonObject = new JsonQuest();

        jsonObject.questid            = id;
        jsonObject.questname          = name;
        jsonObject.queststatus        = status.ToString();
        jsonObject.questachievementid = achievementId;
        jsonObject.questquestflag     = questflag;
        jsonObject.questpointflag     = pointflag;
        jsonObject.questpointvalue    = pointValue;
        List <JsonAction> actionIds = new List <JsonAction>();

        foreach (KeyValuePair <string, int> action in actions)
        {
            actionIds.Add(new JsonAction(action.Key, action.Value));
        }
        jsonObject.questactionids           = actionIds;
        jsonObject.questdescription         = description;
        jsonObject.questnotificationcheck   = notificationcheck;
        jsonObject.questnotificationmessage = notificationmessage;

        string json = JsonUtility.ToJson(jsonObject);

        Debug.Log(json);

        return(json);
    }
コード例 #3
0
    // Updates the label that displays the status of the quest and
    // its objectives
    void UpdateObjectiveSummaryText()
    {
        string label;

        if (activeQuest == null)
        {
            label = "No active quest.";
        }
        else
        {
            label = activeQuest.ToString();
        }

        objectiveSummary.text = label;
    }