Esempio n. 1
0
 public void OnTriggerEnter2D(Collider2D other)
 {
     // detect if collider is Player
     if (other.CompareTag("Player"))
     {
         if (!other.GetComponent <PlayerMovement>().InputIsLocked)
         {
             transitionManager.FadeToScene("DemoEnd");
             other.GetComponent <PlayerMovement>().LockInput(exitDirection);
         }
     }
 }
Esempio n. 2
0
    private void Update()
    {
        if (!isHovering)
        {
            return;
        }

        if (Input.GetMouseButton(0))
        {
            thumbnail.color = clickColor;
            title.color     = clickColor;
            transitionManager.FadeToScene(levelDestination);
            return;
        }

        if (Input.GetMouseButtonUp(0))
        {
            thumbnail.color = hoverColor;
            title.color     = hoverColor;
            return;
        }
    }