Add this class to an object and it will automatically teleport to the other end of the screen when reaching the screen's edges
More...
|
virtual void | Awake () |
| On Awake we initialize our teleporter More...
|
|
virtual void | Initialization () |
| Stores the main camera if needed More...
|
|
virtual void | Update () |
| On Update we check our position relative to the edges More...
|
|
virtual void | DetectEdges () |
| Detects edges, compares with our object's position, and moves it if needed More...
|
|
Add this class to an object and it will automatically teleport to the other end of the screen when reaching the screen's edges
◆ Awake()
virtual void MoreMountains.Tools.MMViewportEdgeTeleporter.Awake |
( |
| ) |
|
|
protectedvirtual |
On Awake we initialize our teleporter
◆ DetectEdges()
virtual void MoreMountains.Tools.MMViewportEdgeTeleporter.DetectEdges |
( |
| ) |
|
|
protectedvirtual |
Detects edges, compares with our object's position, and moves it if needed
◆ Initialization()
virtual void MoreMountains.Tools.MMViewportEdgeTeleporter.Initialization |
( |
| ) |
|
|
protectedvirtual |
Stores the main camera if needed
◆ SetCamera()
virtual void MoreMountains.Tools.MMViewportEdgeTeleporter.SetCamera |
( |
Camera |
newCamera | ) |
|
|
virtual |
Sets a new camera
- Parameters
-
◆ Update()
virtual void MoreMountains.Tools.MMViewportEdgeTeleporter.Update |
( |
| ) |
|
|
protectedvirtual |
On Update we check our position relative to the edges
◆ _newViewportPosition
Vector3 MoreMountains.Tools.MMViewportEdgeTeleporter._newViewportPosition |
|
protected |
◆ _viewportPosition
Vector3 MoreMountains.Tools.MMViewportEdgeTeleporter._viewportPosition |
|
protected |
◆ AutoGrabMainCamera
bool MoreMountains.Tools.MMViewportEdgeTeleporter.AutoGrabMainCamera |
whether or not to grab the Camera.main and store it on init
◆ MainCamera
Camera MoreMountains.Tools.MMViewportEdgeTeleporter.MainCamera |
the camera used to compute viewport positions
◆ OnTeleport
UnityEvent MoreMountains.Tools.MMViewportEdgeTeleporter.OnTeleport |
an event to trigger on teleport
◆ TeleportDimensions
Vector2 MoreMountains.Tools.MMViewportEdgeTeleporter.TeleportDimensions = new Vector2(1f, 1f) |
the dimensions of the teleport destination zone
◆ TeleportOrigin
Vector2 MoreMountains.Tools.MMViewportEdgeTeleporter.TeleportOrigin = new Vector2(0f, 0f) |
the origin of the teleport destination zone
◆ ViewportDimensions
Vector2 MoreMountains.Tools.MMViewportEdgeTeleporter.ViewportDimensions = new Vector2(1f, 1f) |
the dimensions of the viewport
◆ ViewportOrigin
Vector2 MoreMountains.Tools.MMViewportEdgeTeleporter.ViewportOrigin = new Vector2(0f, 0f) |
the origin values of the viewport
The documentation for this class was generated from the following file: