Ejemplo n.º 1
0
 void Start()
 {
     gmPlayer = GetComponent <GameController>().gmPlayer;
     players  = GetComponent <GameController>().players;
     UI       = GetComponent <GameController>().UIController.PassTheBombUI.GetComponent <PassTheBombUI>();
     UI.Setup();
     audioSource = GetComponent <AudioSource>();
     StartCoroutine(StartGame());
 }
Ejemplo n.º 2
0
    void OnEnable()
    {
        PlayerControllerGM gmPlayer = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>().gmPlayer;

        if (gmPlayer != null)
        {
            key = GetComponentInChildren <UIKey>();
            key.SetLetter(gmPlayer.playerKeys[playerIndex].ToString());
        }
    }
Ejemplo n.º 3
0
    void Start()
    {
        InputManager.OnDeviceDetached += OnDeviceDetached;
        UIController     = GameObject.FindGameObjectWithTag("UIController").GetComponent <UIController>();
        cameraController = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraController>();

        //yield return new WaitForEndOfFrame();

        if (withGM)
        {
            GameObject gmPlayerGO = Instantiate(gmPlayerPrefab, gmPosition);
            gmPlayer = gmPlayerGO.GetComponent <PlayerControllerGM>();
            if (inVR)
            {
                XRSettings.showDeviceView = false;
                if (inVR)
                {
                    gmPlayer.SetupVR();
                }
            }
        }
    }