|
|
@@ -0,0 +1,21 @@
|
|
|
+using System.Collections;
|
|
|
+using System.Collections.Generic;
|
|
|
+using UnityEngine;
|
|
|
+
|
|
|
+public class SceneTransmit : MonoBehaviour
|
|
|
+{
|
|
|
+ public Transform transmitTarget;
|
|
|
+ private void OnTriggerEnter(Collider other)
|
|
|
+ {
|
|
|
+ PlayerController playerController = other.GetComponentInParent<PlayerController>();
|
|
|
+ if (playerController!=null)
|
|
|
+ {
|
|
|
+ foreach(var item in playerController.foot.trigGroundList)
|
|
|
+ {
|
|
|
+ item.GetComponent<Platform>().feet.Remove(playerController.foot);
|
|
|
+ }
|
|
|
+ playerController.foot.trigGroundList.Clear();
|
|
|
+ playerController.transform.position = transmitTarget.position;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|