public override void DeserializeCustomObjects(JsonHelper customObjects) { widthInGridCells = customObjects.GetInt("widthInGridCells"); heightInGridCells = customObjects.GetInt("heightInGridCells"); Size = new Vector2(widthInGridCells * GameServices.GameObjectSize.X, GameServices.GameObjectSize.Y); }
/// <summary> /// Deserializes a sprite, given a <see cref="JsonHelper" /> and a key /// for the sprite. /// </summary> /// <param name="helper"> /// The <see cref="JsonHelper" /> that contains the sprite to deserialize /// </param> /// <param name="key">The key in which the sprite is stored.</param> /// <returns>A deserialized (but uninitalized) sprite.</returns> public static Sprite DeserializeSprite(JsonHelper helper, string key = "") { if (string.IsNullOrEmpty(key)) { return DeserializeSprite((JObject)helper.Value); } else { if (helper.Value[key].Type == JTokenType.Null) { return null; } return DeserializeSprite((JObject)helper.Value[key]); } }
public override void DeserializeCustomObjects(JsonHelper customObjects) { }
public override void DeserializeCustomObjects(JsonHelper customObjects) { ContainedSprite = TypeSerializer.DeserializeSprite(customObjects, "containedSprite"); ReleaseType = (ItemBlockItemReleaseType)customObjects.GetInt("releaseType"); Quantity = customObjects.GetInt("quantity"); TimeLimit = customObjects.GetFloat("timeLimit"); IsEmpty = customObjects.GetBool("isEmpty"); }
public override void DeserializeCustomObjects(JsonHelper customObjects) { SpinyState = (SpinyState)customObjects.GetInt("spinyState"); }
/// <summary> /// Loads key custom objects from the level file. /// </summary> /// <param name="customObjects">An object containing key custom objects.</param> public abstract void DeserializeCustomObjects(JsonHelper customObjects);
public override void DeserializeCustomObjects(JsonHelper customObjects) { SpawnBandStart = customObjects.GetFloat("spawnBandStart"); SpawnBandEnd = customObjects.GetFloat("spawnBandEnd"); ThrownSprite = TypeSerializer.DeserializeSprite(customObjects, "thrownSprite"); }
public override void DeserializeCustomObjects(JsonHelper customObjects) { Variety = (KoopaVariety)customObjects.GetInt("type"); }
public override void DeserializeCustomObjects(JsonHelper customObjects) { Palette = (GoombaPalette)customObjects.GetInt("palette"); }