Esempio n. 1
0
 public void SetItemActive(bool flag)
 {
     MainCamera.GetComponent <CameraMove>().enabled   = flag;
     MasterCamera.GetComponent <CameraMove>().enabled = flag;
     foreach (GameObject item in ItemCanvasList.ItemCanvasObjList)
     {
         item.GetComponent <UIRaycaster>().enabled = flag;
     }
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        m_MainCameraScript = GameObject.FindWithTag("MainCamera").GetComponent <CameraMove>();
        m_postProcess      = m_MainCameraScript.GetComponent <PostProcessingBehaviour>().profile;

        //Assign players
        if (GameObject.FindWithTag("GameController").GetComponent <GameManager>().m_singlePlayer)
        {
            m_player1 = GameObject.FindWithTag("GameController").GetComponent <GameManager>().m_player1;
        }
        else
        {
            m_player1 = GameObject.FindWithTag("GameController").GetComponent <GameManager>().m_player1;
            m_player2 = GameObject.FindWithTag("GameController").GetComponent <GameManager>().m_player2;
        }
    }
Esempio n. 3
0
 public void WaitCtrlPress()
 {
     if (Input.GetButtonDown("Drop"))
     {
         UnityEngine.Debug.Log("Ctrl presse");
         if (Dom.ctrlpressed == true)
         {
             Dom.UnPrint();
             camera.IsFrozen = false;
         }
         else
         {
             Camera mycam = camera.GetComponent <Camera>();
             Dom.cameraposition = mycam.ScreenToViewportPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, mycam.nearClipPlane));
             camera.IsFrozen    = true;
             Dom.PrintDropList();
         }
         Dom.ctrlpressed = !Dom.ctrlpressed;
     }
 }