|
|
@@ -0,0 +1,24 @@
|
|
|
+using System.Collections;
|
|
|
+using System.Collections.Generic;
|
|
|
+using UnityEngine;
|
|
|
+
|
|
|
+public class SceneUp : MonoBehaviour
|
|
|
+{
|
|
|
+ public float speed;
|
|
|
+ // Start is called before the first frame update
|
|
|
+ void Start()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // Update is called once per frame
|
|
|
+ void Update()
|
|
|
+ {
|
|
|
+ if (PlayersInput.instance[0] == null)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ speed = (PlayersInput.instance[0].transform.position.y - transform.position.y)/2f;
|
|
|
+ transform.position += Vector3.up * Time.deltaTime * speed;
|
|
|
+ }
|
|
|
+}
|