private void BuildGenericObjective(GameObject parent, JObject objective, string name, string title, string guid, bool isPrimaryObjectve, int priority, bool displayToUser, string contractObjectiveGuid) { string description = (objective.ContainsKey("Description") ? objective["Description"].ToString() : title); EmptyObjectiveObjective objectiveLogic = ObjectiveFactory.CreateEmptyObjective(guid, parent, contractObjectiveGuid, name, title, description, isPrimaryObjectve, priority, displayToUser); }
public static EmptyObjectiveObjective CreateEmptyObjective(string objectiveGuid, GameObject parent, string contractObjectiveGuid, string objectName, string title, string description, bool isPrimaryObjectve, int priority, bool displayToUser) { GameObject emptyObjectiveGo = CreateGameObject(parent, objectName); EmptyObjectiveObjective emptyObjective = emptyObjectiveGo.AddComponent <EmptyObjectiveObjective>(); emptyObjective.title = title; emptyObjective.description = description; emptyObjective.priority = priority; emptyObjective.displayToUser = displayToUser; AttachRequiredReferences(emptyObjective, contractObjectiveGuid); return(emptyObjective); }