Ejemplo n.º 1
0
 public string GetInfo()
 {
     return($"Reward: {Reward}\n" +
            $"QuestStatus: {Status.ToString()}\n" +
            $"Enemy Difficult: {Difficult.ToString()}\n" +
            $"Enemy Count: {Count.ToString()}\n");
 }
Ejemplo n.º 2
0
    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);
    }
    // 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;
    }