示例#1
0
 private void signCharToMap(GroundChar groundChar)
 {
     groundChar.Map = this;
     grid.Add(groundChar);
 }
示例#2
0
 /// <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);
 }
示例#3
0
        /// <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);
        }
示例#4
0
 public void RemoveMapChar(GroundChar mapChar)
 {
     Entities[0].MapChars.Remove(mapChar);
     grid.Remove(mapChar);
 }
示例#5
0
 public void AddMapChar(GroundChar mapChar)
 {
     Entities[0].MapChars.Add(mapChar);
     signCharToMap(mapChar);
 }
示例#6
0
 /// <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);
 }
示例#7
0
 public void RemoveMapChar(GroundChar mapChar)
 {
     MapChars.Remove(mapChar);
     grid.Remove(mapChar);
 }
示例#8
0
        /// <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);
        }
示例#9
0
 public void AddMapChar(GroundChar mapChar)
 {
     MapChars.Add(mapChar);
     signCharToMap(mapChar);
 }