Exemplo n.º 1
0
 public void DropMenu()
 {
     if (currenthubObject == null)
     {
         return;
     }
     currenthubObject.FadeMenu(false);
     currenthubObject     = null;
     backBtn.interactable = false;
     transitionFrame      = true;
     SetDesiredWayPoint(defaultCameraWayPoint);
 }
Exemplo n.º 2
0
    private void Update()
    {
        MoveCamera();

        if (Input.GetMouseButtonUp(0) && !transistionFrame)
        {
            RaycastHit hit;
            if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, 75.0f, LayerMask.GetMask("HubObject")))
            {
                Debug.Log(hit.transform.name);
                currentHubObject = hit.transform.GetComponent <HubObject>();
                currentHubObject.FadeMenu(true);
                SetDesiredWaypoint(currentHubObject.waypoint);
                backButton.interactable = true;
            }
        }
        transistionFrame = false;
    }