public SetTileCharacterCommand(Tile tile, Character character) { tile.ThrowIfNull("sprite"); character.ThrowIfNull("character"); _tile = tile; _character = character; }
protected Tile( Coordinate coordinate, Character character) { character.ThrowIfNull("character"); Coordinate = coordinate; Character = character; }
public XElement Serialize(Character character, string elementName = "character") { character.ThrowIfNull("character"); elementName.ThrowIfNull("elementName"); return new XElement( elementName, new XAttribute("symbol", character.Symbol), new XAttribute("foregroundColor", ColorSerializer.Instance.Serialize(character.ForegroundColor)), new XAttribute("backgroundColor", ColorSerializer.Instance.Serialize(character.BackgroundColor))); }
public IEnumerable<Sprite> CreateArea(Coordinate originCoordinate, Size size, Character character) { character.ThrowIfNull("character"); for (int x = 0; x < size.Width; x++) { for (int y = 0; y < size.Height; y++) { yield return new Sprite(new Coordinate(originCoordinate.X + x, originCoordinate.Y + y), character); } } }
public Player( Guid id, Guid boardId, Coordinate coordinate, Character character, EventHandlerCollection eventHandlerCollection = null) { character.ThrowIfNull("character"); _id = id; BoardId = boardId; _character = character; _eventHandlerCollection = eventHandlerCollection; Coordinate = coordinate; }
public Actor( Guid id, string name, string description, Character character) { name.ThrowIfNull("name"); description.ThrowIfNull("description"); character.ThrowIfNull("character"); _id = id; Name = name; Description = description; Character = character; }