Beispiel #1
0
 private void Awake()
 {
     connectPanel.SetActive(true);
     lobbyCanvasObj.SetActive(true);
     currentRoomCanvasObj.SetActive(true);
     lobbychatObj.SetActive(false);
     Instance = this;
 }
Beispiel #2
0
    private void Start()
    {
        mMainSceneIndex = SceneManager.GetActiveScene().buildIndex;

        Debug.Log("Connected? " + PhotonNetwork.IsConnected);
        mMainCanvasManager = GetComponent <MainCanvasManager>();
        PhotonNetwork.AutomaticallySyncScene = true;
        PhotonNetwork.SendRate = mSendRate;
    }
Beispiel #3
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
    private void Awake()
    {
        // Connect to server
        PhotonNetwork.ConnectUsingSettings("0.0.0");

        // Find canvas manager if not set manually
        if (!_canvasManager)
        {
            GameObject cm = GameObject.Find("Canvas");
            if (cm)
            {
                _canvasManager = cm.GetComponent <MainCanvasManager>();
            }
        }

        // Set the initial game state
        ChangeState(LobbyState.LOGIN);
    }
    //private bool myconsole_delete_buffer;


    /**************************************************
    * Start()
    **************************************************/
    void Start()
    {
        // 画面が消えないようにする
        if (screen_not_sleep)
        {
            Screen.sleepTimeout = SleepTimeout.NeverSleep;
        }
        else
        {
            Screen.sleepTimeout = SleepTimeout.SystemSetting;
        }

        // Canvasを取得
        MainCanvas      = GameObject.Find("Main System/Main Canvas").GetComponent <MainCanvasManager>();
        SettingsCanvas  = GameObject.Find("Main System/Settings Canvas").GetComponent <SettingsCanvasManager>();
        MyConsoleCanvas = GameObject.Find("Main System/MyConsole Canvas").GetComponent <MyConsoleCanvasManager>();

        // CanvasをDictionaryに追加
        CanvasDictionary.Add(CanvasName.MainCanvas, MainCanvas.gameObject);
        CanvasDictionary.Add(CanvasName.SettingCanvas, SettingsCanvas.gameObject);
        CanvasDictionary.Add(CanvasName.MyConsoleCanvas, MyConsoleCanvas.gameObject);
    }
Beispiel #6
0
 private void Awake()
 {
     Instance = this;
 }
 void Awake()
 {
     m_instance = this;
 }
 void Awake()
 {
     Instance = this;
 }
Beispiel #9
0
 private void Awake()
 {
     inst = this;
 }
Beispiel #10
0
 private void Awake()
 {
     instance = this;;
 }
 private void Awake()
 {
     instane = this;
 }