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.

60 lines
1.5 KiB

using System;
using UnityEngine;
namespace FX
{
// Token: 0x02000748 RID: 1864
public class FX_PositionCurve : MonoBehaviour
{
// Token: 0x06002FFB RID: 12283 RVA: 0x001010D8 File Offset: 0x001010D8
private void Update()
{
float x = this.keyValueMagnification * this.CurveX.Evaluate(this.duration);
float y = this.keyValueMagnification * this.CurveY.Evaluate(this.duration);
float z = this.keyValueMagnification * this.CurveZ.Evaluate(this.duration);
this.animState = new Vector3(x, y, z);
base.transform.Translate(this.animState - this.preState);
this.preState = this.animState;
this.duration += Time.deltaTime / this.keyTimeMagnification;
}
// Token: 0x04005592 RID: 21906
[SerializeField]
private float keyValueMagnification = 1f;
// Token: 0x04005593 RID: 21907
[SerializeField]
private float keyTimeMagnification = 1f;
// Token: 0x04005594 RID: 21908
private float duration;
// Token: 0x04005595 RID: 21909
private Vector3 preState = new Vector3(0f, 0f, 0f);
// Token: 0x04005596 RID: 21910
private Vector3 animState;
// Token: 0x04005597 RID: 21911
public AnimationCurve CurveX = new AnimationCurve(new Keyframe[]
{
new Keyframe(0f, 0f),
new Keyframe(0f, 0f)
});
// Token: 0x04005598 RID: 21912
public AnimationCurve CurveY = new AnimationCurve(new Keyframe[]
{
new Keyframe(0f, 0f),
new Keyframe(0f, 0f)
});
// Token: 0x04005599 RID: 21913
public AnimationCurve CurveZ = new AnimationCurve(new Keyframe[]
{
new Keyframe(0f, 0f),
new Keyframe(0f, 0f)
});
}
}