/// <summary>
    /// Initilaises the game syncher
    /// Code relying on the world goes here
    /// </summary>
    void Initialise()
    {
        m_nodes = Utilities.GetOrderedList<IslandDiscoveryNode>();
        if(m_nodes.Count == 0)
        {
            Debug.LogError("Could not find any island nodes");
        }

        m_network = Utilities.GetNetworking();
        m_gameManager = GameModeManager.Get();
        m_startUpTime = Time.time;
        m_initialised = true;
    }
Beispiel #2
0
    /// <summary>
    /// Initilaises the game syncher
    /// Code relying on the world goes here
    /// </summary>
    void Initialise()
    {
        m_nodes = Utilities.GetOrderedList <IslandDiscoveryNode>();
        if (m_nodes.Count == 0)
        {
            Debug.LogError("Could not find any island nodes");
        }

        m_network     = Utilities.GetNetworking();
        m_gameManager = GameModeManager.Get();
        m_startUpTime = Time.time;
        m_initialised = true;
    }
Beispiel #3
0
 /// <summary>
 /// Gets the Network Matchmaker instance from the scene
 /// Note, relies on only one matchmaker instance per scene
 /// </summary>
 public static NetworkMatchmaker GetNetworking()
 {
     if (sm_networking == null)
     {
         sm_networking = GameObject.FindObjectOfType <NetworkMatchmaker>();
         if (sm_networking == null)
         {
             throw new NullReferenceException(
                       "Could not find Random Matchmaker in scene");
         }
     }
     return(sm_networking);
 }
    /// <summary>
    /// Initialises the script
    /// </summary>
    void Start()
    {
        m_network = Utilities.GetNetworking();

        m_camera = FindObjectOfType <CameraMovement>();
        if (m_camera == null)
        {
            Debug.LogError("Could not find camera script");
        }

        if (replayGameText.color != toMenuText.color)
        {
            Debug.LogError("Colours do not match for game over text");
        }

        m_textColour = replayGameText.color;
    }
 /// <summary>
 /// Initialises the script
 /// </summary>
 void Start()
 {
     m_network = Utilities.GetNetworking();
 }
 /// <summary>
 /// Initialises the lobby
 /// </summary>
 void Start()
 {
     m_network = Utilities.GetNetworking();
     m_playersList = GameObject.FindObjectOfType<ConnectedPlayersList>();
 }
 /// <summary>
 /// Initialises the lobby
 /// </summary>
 void Start()
 {
     m_network     = Utilities.GetNetworking();
     m_playersList = GameObject.FindObjectOfType <ConnectedPlayersList>();
 }
 /// <summary>
 /// Initialises the script
 /// </summary>
 void Start()
 {
     m_network = Utilities.GetNetworking();
 }
    /// <summary>
    /// Initialises the script
    /// </summary>
    void Start()
    {
        m_network = Utilities.GetNetworking();

        m_camera = FindObjectOfType<CameraMovement>();
        if(m_camera == null)
        {
            Debug.LogError("Could not find camera script");
        }

        if(replayGameText.color != toMenuText.color)
        {
            Debug.LogError("Colours do not match for game over text");
        }

        m_textColour = replayGameText.color;
    }