/// <summary> /// Create a Character in the specified tile, with the specified color, uniform color and skin color. /// </summary> /// <param name="tile">The tile where the Character is placed.</param> /// <param name="color">The uniform strip color.</param> /// <param name="uniformColor">The uniform color.</param> /// <param name="skinColor">The skin color.</param> /// <param name="name">The name of the character, will get a new one if it is null.</param> public Character Create(Tile tile, Color color, Color uniformColor, Color skinColor, string name = null) { Character character = new Character(tile, color, uniformColor, skinColor, name != null ? name : CharacterNameManager.GetNewName()); Characters.Add(character); TimeManager.Instance.RegisterFastUpdate(character); if (Created != null) { Created(character); } return(character); }
/// <summary> /// Create a Character in the specified tile. /// </summary> /// <param name="tile">The tile where the Character is placed.</param> /// <param name="name">The name of the character, will get a new one if it is null.</param> public Character Create(Tile tile, string name = null) { return(Create(tile, ColorUtilities.RandomColor(), ColorUtilities.RandomGrayColor(), ColorUtilities.RandomSkinColor(), name != null ? name : CharacterNameManager.GetNewName())); }