Exemplo n.º 1
0
    private ConnectionMenu ConnectionMenu; // used to display connection staus


    #region MonoBehaviour
    void Awake()
    {
        // dont destroy client object when changing scean<
        DontDestroyOnLoad(gameObject);

        ConnectionMenu = GameObject.Find("ConnectionMenu").GetComponent <ConnectionMenu>();
    }
Exemplo n.º 2
0
        private void connectionList_ButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
        {
            TreePath path;

            if (connectionList.GetPathAtPos((int)args.Event.X, (int)args.Event.Y, out path))
            {
                connectionList.Selection.SelectPath(path);
            }
            else
            {
                connectionList.Selection.UnselectAll();
            }

            if (args.Event.Button == 3)
            {
                ConnectionMenu menu = new ConnectionMenu(connectionList);
                menu.Popup(GetSelectedConnection());
            }
        }
Exemplo n.º 3
0
 /// <summary>Called when the lobby scene from Unity is loaded.</summary>
 /// <param name="lvl">Id of the level loaded.</param>
 /// <returns>void</returns>
 public override void onLevelWasLoaded(int lvl)
 {
     loaded         = true;
     connectionMenu = GameObject.FindGameObjectWithTag("ConnectionMenu").GetComponent <ConnectionMenu>();
     EventManager.Raise(EnumEvent.CONNECTIONSTATE);
 }