Fixed small visual bugs
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Teleporter : MonoBehaviour
|
||||
{
|
||||
public GameObject destination;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
destination = transform.Find("B").gameObject;
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (other.gameObject.tag == "Player");
|
||||
{
|
||||
other.transform.position=destination.transform.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user