Octgn.Play.Card.SetMarker C# (CSharp) Method

SetMarker() private method

private SetMarker ( Octgn.Play.Player player, System.Guid lId, string name, int count, bool notify = true ) : void
player Octgn.Play.Player
lId System.Guid
name string
count int
notify bool
return void
        internal void SetMarker(Player player, Guid lId, string name, int count, bool notify = true)
        {
            int oldCount = 0;
            Marker marker = FindMarker(lId, name);
            if (marker != null)
            {
                oldCount = marker.Count;
                marker.SetCount((ushort)count);
            }
            else if (count > 0)
            {
                DataNew.Entities.Marker model = Program.GameEngine.GetMarkerModel(lId);
                model.Name = name;
                AddMarker(model, (ushort)count);
            }
        }

Usage Example

Exemplo n.º 1
0
 public void SetMarker(Player player, Card card, Guid id, string name, ushort count)
 {
     // Always perform this call (even if player == LocalPlayer) for consistency as markers aren't an exclusive resource
     card.SetMarker(player, id, name, count);
 }