MVP for Dump Puzzle
This commit is contained in:
22
Assets/Scripts/DamianExperiments/Dump/Teleporter.cs
Normal file
22
Assets/Scripts/DamianExperiments/Dump/Teleporter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Teleporter : MonoBehaviour
|
||||
{
|
||||
public GameObject ObjectToTeleportA;
|
||||
public GameObject ObjectToTeleportB;
|
||||
|
||||
public Transform TeleportLocationA;
|
||||
public Transform TeleportLocationB;
|
||||
|
||||
public void TeleporObjects()
|
||||
{
|
||||
if (ObjectToTeleportA != null && TeleportLocationA != null)
|
||||
{
|
||||
ObjectToTeleportA.transform.position = TeleportLocationA.position;
|
||||
}
|
||||
if (ObjectToTeleportB != null && TeleportLocationB != null)
|
||||
{
|
||||
ObjectToTeleportB.transform.position = TeleportLocationB.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user