/// <summary> /// Used to initialize any variables or game state before the game starts. /// </summary> void Awake() { Instance = this; Player1.Name = GameManager.Instance.Player1Name; Player2.Name = GameManager.Instance.Player2Name; Player1.PlayerControlMode = GameManager.Instance.Player1ControlMode; Player2.PlayerControlMode = GameManager.Instance.Player2ControlMode; IsCrawfordRuleEnabled = GameManager.Instance.IsCrawfordRuleEnabled; IsMurphyRuleEnabled = GameManager.Instance.IsMurphyRuleEnabled; Variant = GameManager.Instance.BackgammonVariant; PlayMode = GameManager.Instance.BackgammonPlayMode; MatchScore = GameManager.Instance.MatchScore; InitialStakes = GameManager.Instance.InitialStakes; if (IsMultiplayerGame) { m_Client = FindObjectOfType <BackgammonClient>(); } }
/// <summary> /// Sets the Backgammon play mode with the specified int value. /// </summary> /// <param name="playMode"></param> public void SetBackgammonPlayMode(int playMode) { m_BackgammonPlayMode = (BackgammonPlayMode)playMode; }