public Trophy(int id, string title, string description, TrophyDifficulty difficulty, bool unlocked) { this.ID = id; this.Title = title; this.Description = description; this.Difficulty = difficulty; this.Unlocked = unlocked; }
/// <summary> /// Initializes a new instance of the <see cref="Trophy"/> class. /// </summary> /// <param name="id">The <see cref="Trophy"/> ID.</param> /// <param name="title">The <see cref="Trophy"/> title.</param> /// <param name="description">The <see cref="Trophy"/> description.</param> /// <param name="difficulty">The <see cref="Trophy"/> difficulty.</param> /// <param name="unlocked">If set to <c>true</c> unlocked.</param> public Trophy(int id, string title, string description, TrophyDifficulty difficulty, bool unlocked) { ID = id; Title = title; Description = description; Difficulty = difficulty; Unlocked = unlocked; }
/// <summary> /// Initializes a new instance of the <see cref="Trophy"/> class. /// </summary> /// <param name="id">The <see cref="Trophy"/> ID.</param> /// <param name="title">The <see cref="Trophy"/> title.</param> /// <param name="description">The <see cref="Trophy"/> description.</param> /// <param name="difficulty">The <see cref="Trophy"/> difficulty.</param> /// <param name="unlocked">If set to <c>true</c> unlocked.</param> public Trophy(int id, string title, string description, TrophyDifficulty difficulty, bool unlocked) { ID = id; Title = title; Description = description; Difficulty = difficulty; Unlocked = unlocked; IsSecret = GameJoltAPI.Instance.IsSecretTrophy(ID); }
/// <summary> /// Initializes a new instance of the <see cref="GJTrophy"/> class. /// </summary> /// <param name='id'> /// The trophy identifier. /// </param> /// <param name='title'> /// The trophy name. /// </param> /// <param name='difficulty'> /// The trophy difficulty. See <see cref="GJTrophy.TrophyDifficulty"/>. /// </param> /// <param name='achieved'> /// Is the trophy achieved. /// </param> /// <param name='description'> /// The trophy description. Default empty. /// </param> /// <param name='imageURL'> /// The URL to the trophy's thumbnail. Default empty. /// </param> public GJTrophy(uint id, string title, TrophyDifficulty difficulty, bool achieved, string description = "", string imageURL = "") { this.AddProperty("id", id.ToString()); this.AddProperty("title", title); this.AddProperty("difficulty", difficulty.ToString()); this.AddProperty("achieved", achieved.ToString()); this.AddProperty("description", description); this.AddProperty("image_url", imageURL); }
/// <summary> /// Initializes a new instance of the <see cref="GJTrophy"/> class. /// </summary> /// <param name='id'> /// The trophy identifier. /// </param> /// <param name='title'> /// The trophy name. /// </param> /// <param name='difficulty'> /// The trophy difficulty. See <see cref="GJTrophy.TrophyDifficulty"/>. /// </param> /// <param name='achieved'> /// Is the trophy achieved. /// </param> /// <param name='description'> /// The trophy description. Default empty. /// </param> /// <param name='imageURL'> /// The URL to the trophy's thumbnail. Default empty. /// </param> public GJTrophy(uint id, string title, TrophyDifficulty difficulty, bool achieved, string description = "", string imageURL = "") { this.AddProperty ("id", id.ToString ()); this.AddProperty ("title", title); this.AddProperty ("difficulty", difficulty.ToString ()); this.AddProperty ("achieved", achieved.ToString ()); this.AddProperty ("description", description); this.AddProperty ("image_url", imageURL); }
internal TrophyData(TrophyModel model) { Id = model.Id; Title = model.Title; ImageUrl = model.ImageUrl; Title = model.Title; Description = model.Description; Difficulty = model.Difficulty; if (!bool.TryParse(model.Achieved, out IsAchieved)) { IsAchieved = true; AchievedDisplayTime = model.Achieved; } else { AchievedDisplayTime = null; } }