IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
TeleportMarkerBase.cs
1 //======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 //
3 // Purpose: Base class for all the objects that the player can teleport to
4 //
5 //=============================================================================
6 
7 using UnityEngine;
8 
9 namespace Valve.VR.InteractionSystem
10 {
11  //-------------------------------------------------------------------------
12  public abstract class TeleportMarkerBase : MonoBehaviour
13  {
14  public bool locked = false;
15  public bool markerActive = true;
16 
17  //-------------------------------------------------
18  public virtual bool showReticle
19  {
20  get
21  {
22  return true;
23  }
24  }
25 
26 
27  //-------------------------------------------------
28  public void SetLocked( bool locked )
29  {
30  this.locked = locked;
31 
32  UpdateVisuals();
33  }
34 
35 
36  //-------------------------------------------------
37  public virtual void TeleportPlayer( Vector3 pointedAtPosition )
38  {
39  }
40 
41 
42  //-------------------------------------------------
43  public abstract void UpdateVisuals();
44 
45  //-------------------------------------------------
46  public abstract void Highlight( bool highlight );
47 
48  //-------------------------------------------------
49  public abstract void SetAlpha( float tintAlpha, float alphaPercent );
50 
51  //-------------------------------------------------
52  public abstract bool ShouldActivate( Vector3 playerPosition );
53 
54  //-------------------------------------------------
55  public abstract bool ShouldMovePlayer();
56  }
57 }