Octgn.Play.Card.SwitchTo C# (CSharp) Méthode

SwitchTo() public méthode

public SwitchTo ( Octgn.Play.Player player, string alternate = "", bool notifyServer = true ) : void
player Octgn.Play.Player
alternate string
notifyServer bool
Résultat 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

Exemple #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