public void RPC_SendCardToGrave(int photonId) { PlayerHolder p = GetPlayer(photonId).ThisPlayer; foreach (int id in p.CardManager.deadCards) { Card c = p.CardManager.SearchCard(id); Transform graveyardTransform = c.User.CardTransform.Graveyard.value; Debug.LogFormat("RPC_SendCardToGrave: Player({0})'s {1} is dead. It's going to graveyard: {2}", p.PlayerProfile.UniqueId, c.GetCardData.Name, graveyardTransform); CardSyncManager.MoveCardToGrave(c, graveyardTransform); } }
private void Awake() { singleton = this; DontDestroyOnLoad(this.gameObject); }