Exemplo n.º 1
0
 public void Teleport(CinemaChair chair)
 {
     if (chair != null)
     {
         transform.position = chair.occupyTransform.position;
         transform.rotation = chair.occupyTransform.rotation;
     }
 }
Exemplo n.º 2
0
    private void Highlight()
    {
        CinemaChair chair = null;

        RaycastHit raycastHit;

        if (Physics.Raycast(pointer.position, pointer.forward, out raycastHit, 10, LayerMask.GetMask("Chair"), QueryTriggerInteraction.Collide))
        {
            chair = raycastHit.transform.GetComponent <CinemaChair>();
        }
        SetPointedAt(chair);
    }
Exemplo n.º 3
0
    private void SetPointedAt(CinemaChair chair)
    {
        if (currentlyPointedAt != null)
        {
            currentlyPointedAt.isHighlighted = false;
        }

        currentlyPointedAt = chair;

        if (currentlyPointedAt != null)
        {
            currentlyPointedAt.isHighlighted = true;
        }
    }