14 lines
351 B
C#
14 lines
351 B
C#
using UnityEngine;
|
|
|
|
|
|
public class Passage : MonoBehaviour
|
|
{
|
|
public Transform connection;
|
|
private void OnTriggerEnter2D(Collider2D other) {
|
|
Vector3 position = other.transform.position;
|
|
position.x = this.connection.position.x;
|
|
position.y = this.connection.position.y;
|
|
other.transform.position = position;
|
|
}
|
|
}
|