private void signCharToMap(GroundChar groundChar) { groundChar.Map = this; grid.Add(groundChar); }
/// <summary> /// Add a character entity that shouldn't be serialized! /// </summary> /// <param name="ch"></param> public void AddTempChar(GroundChar ch) { ch.Map = this; Entities[0].TemporaryChars.Add(ch); grid.Add(ch); }
/// <summary> /// Lookup a temp character by instance name on the map, and return it if found, or returns null if not found. /// </summary> /// <param name="instancename">The name of the instance of this character</param> /// <returns>Character instance or null if not found</returns> public GroundChar GetTempChar(string instancename) { GroundChar found = Entities[0].TemporaryChars.Find((GroundChar ch) => { return(ch.EntName == instancename); }); return(found); }
public void RemoveMapChar(GroundChar mapChar) { Entities[0].MapChars.Remove(mapChar); grid.Remove(mapChar); }
public void AddMapChar(GroundChar mapChar) { Entities[0].MapChars.Add(mapChar); signCharToMap(mapChar); }
/// <summary> /// Removed a temp character entity from the list of temp characters /// </summary> /// <param name="ch"></param> public void RemoveTempChar(GroundChar ch) { TemporaryChars.Remove(ch); grid.Remove(ch); }
public void RemoveMapChar(GroundChar mapChar) { MapChars.Remove(mapChar); grid.Remove(mapChar); }
/// <summary> /// Lookup a map character by instance name on the map, and return it if found, or returns null if not found. /// </summary> /// <param name="instancename">The name of the instance of this character</param> /// <returns>Character instance or null if not found</returns> public GroundChar GetMapChar(string instancename) { GroundChar found = MapChars.Find((GroundChar ch) => { return(ch.EntName == instancename); }); return(found); }
public void AddMapChar(GroundChar mapChar) { MapChars.Add(mapChar); signCharToMap(mapChar); }