public override void Deserialize(string state) { List <string> tokens = StringConverter.DeserializeTokens(state); base.Deserialize(tokens[0]); keymap = StringConverter.Deserialize <int, int>(tokens[1], str => int.Parse(str), str => int.Parse(str)); }
public override void Deserialize(string state) { List <string> tokens = StringConverter.DeserializeTokens(state); base.Deserialize(tokens[0]); walkDirection = int.Parse(tokens[1]); walkDuration = int.Parse(tokens[2]); run = bool.Parse(tokens[3]); controllerWalkChecks = StringConverter.Deserialize <int>(tokens[4], str => int.Parse(str)); }
virtual public void Deserialize(string state) { List <string> tokens = StringConverter.DeserializeTokens(state); this.X = int.Parse(tokens[0]); this.Y = int.Parse(tokens[1]); if (tokens[2] != "<null>") { this.Sprite = Sprite.Sprites[tokens[2]]; } else { this.Sprite = null; } this.Width = int.Parse(tokens[3]); this.Height = int.Parse(tokens[4]); this.ImageIndex = int.Parse(tokens[5]); }