void OnDeletePlayer(RPC.DeletePlayerPayload payload) { if (otherPlayerObjs.ContainsKey(payload.Id)) { Destroy(otherPlayerObjs[payload.Id]); otherPlayerObjs.Remove(payload.Id); } else if (payload.Id == playerId) { Destroy(playerObj); Invoke("RestartGame", 3); } }
public DeletePlayer(DeletePlayerPayload payload) { this.Payload = payload; }