You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
785 B

using System;
using UnityEngine;
namespace FX
{
// Token: 0x0200074F RID: 1871
public class FX_TurnTranslate : MonoBehaviour
{
// Token: 0x0600300C RID: 12300 RVA: 0x00101BD4 File Offset: 0x00101BD4
private void OnEnable()
{
this.prePos = base.transform.position;
}
// Token: 0x0600300D RID: 12301 RVA: 0x00101BE8 File Offset: 0x00101BE8
private void Update()
{
Transform transform = base.transform;
Vector3 position = transform.position;
this.newPos = position - this.prePos;
if (0.0001f < this.newPos.sqrMagnitude)
{
transform.rotation = Quaternion.LookRotation(this.newPos);
}
this.prePos = position;
}
// Token: 0x040055C0 RID: 21952
private Vector3 prePos;
// Token: 0x040055C1 RID: 21953
private Vector3 newPos;
}
}