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

SwitchTo() public method

public SwitchTo ( Octgn.Play.Player player, string alternate = "", bool notifyServer = true ) : void
player Octgn.Play.Player
alternate string
notifyServer bool
return void
        public void SwitchTo(Player player, string alternate = "", bool notifyServer = true)
        {
            if (_type.Model == null) return;
            if (_type.Model.Alternate.ToLower() == alternate.ToLower()) return;
            if (player.Id == Player.LocalPlayer.Id)
                if (notifyServer)
                    Program.Client.Rpc.CardSwitchTo(player, this, alternate);
            _type.Model.SetPropertySet(alternate);
            Size = _type.Model.Size;
            this.OnPropertyChanged("Picture");
            OnPropertyChanged("RealWidth");
            OnPropertyChanged("RealHeight");
            OnPropertyChanged("RealCornerRadius");
        }

Usage Example

Esempio n. 1
0
 public void CardSwitchTo(Player player, Card card, string alternate)
 {
     if (player.Id != Player.LocalPlayer.Id)
     {
         card.SwitchTo(player, alternate);
     }
 }
All Usage Examples Of Octgn.Play.Card::SwitchTo