Example #1
0
    void Awake()
    {
        if (currentInstance != null)
        {
            Destroy(gameObject);
            return;
        }

        DontDestroyOnLoad(gameObject);

        net             = GetComponent <LSNet>();
        currentInstance = this;

        NetworkInit();
    }
Example #2
0
 public void OnServerActive(LSNet net)
 {
     Debug.Log("Server active.");
     this.net = net;
 }
Example #3
0
    // Network stuff.

    public void OnConnected(LSNet net)
    {
        Debug.Log("Connected to server.");
    }