Example #1
0
 /// <summary>
 /// Called on every NetworkBehaviour when it is activated on a client.
 /// <para>Objects on the host have this function called, as there is a local client on the host. The values of SyncVars on object are guaranteed to be initialized correctly with the latest state from the server when this function is called on the client.</para>
 /// </summary>
 public override void OnStartClient()
 {
     base.OnStartClient();
     m_PlayerInfo.ID         = m_ID;
     m_PlayerInfo.CurrentLap = 0;
     m_PlayerInfo.isLeader   = m_PolePositionManager.CheckIsLeader();
     m_PolePositionManager.AddPlayer(m_PlayerInfo);
 }