align steles puzzle

This commit is contained in:
2023-04-25 11:31:25 +02:00
parent 218bfcbd71
commit b79e80b898
21 changed files with 1489 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
using NaughtyAttributes;
using UnityEngine;
namespace Station46.Modules.Steles.Scripts
{
public class AlignStele : MonoBehaviour
{
public float speed;
[ShowNativeProperty] public float Displacement { get; set; }
private void Update()
{
var t = transform;
var position = t.localPosition;
var delta = position.y - Displacement;
t.localPosition = new Vector3(0, position.y - delta * speed, 0);
}
}
}