mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-12-01 09:27:59 +01:00
20 lines
497 B
C#
20 lines
497 B
C#
using UnityEngine;
|
|
|
|
public class FieBrobShadow : MonoBehaviour
|
|
{
|
|
private float _initHight;
|
|
|
|
private void Start()
|
|
{
|
|
Vector3 position = base.transform.parent.position;
|
|
float y = position.y;
|
|
Vector3 position2 = base.transform.position;
|
|
_initHight = y - position2.y;
|
|
}
|
|
|
|
private void LateUpdate()
|
|
{
|
|
base.transform.position = base.transform.parent.position + Vector3.down * _initHight;
|
|
base.transform.rotation = Quaternion.LookRotation(Vector3.up, base.transform.parent.forward);
|
|
}
|
|
}
|