예제 #1
0
        private void OnDeckChanged(SyncListNetCardStack.Operation op, int deckIndex, NetCardStack deckValue)
        {
            if (op == SyncList <NetCardStack> .Operation.OP_ADD)
            {
                return;
            }

            CGSNetManager.Instance.LocalPlayer.OnChangeDeck(deckIndex);
        }
예제 #2
0
        public void ChangeDeck(int deckIndex, string[] cardIds)
        {
            if (NetworkManager.singleton.isNetworkActive && !isServer)
            {
                Debug.LogWarning(NetworkWarningMessage);
                return;
            }

            GameObject owner = cardStacks[deckIndex].owner;

            cardStacks[deckIndex] = new NetCardStack(owner, cardIds);
        }