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.

71 lines
1.7 KiB

using System;
using UnityEngine;
namespace FX
{
// Token: 0x0200074B RID: 1867
public class FX_ScaleCurve : MonoBehaviour
{
// Token: 0x06003002 RID: 12290 RVA: 0x001017DC File Offset: 0x001017DC
private void Update()
{
if (!(this.resetTime & this.toggleResetTime))
{
if (this.resetTime & !this.toggleResetTime)
{
this.duration = 0f;
this.toggleResetTime = true;
}
else
{
this.toggleResetTime = false;
}
}
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.duration += Time.deltaTime / this.keyTimeMagnification;
base.transform.localScale = new Vector3(x, y, z);
}
// Token: 0x040055AA RID: 21930
[SerializeField]
private float keyValueMagnification = 1f;
// Token: 0x040055AB RID: 21931
[SerializeField]
private float keyTimeMagnification = 1f;
// Token: 0x040055AC RID: 21932
private float duration;
// Token: 0x040055AD RID: 21933
[SerializeField]
private bool resetTime;
// Token: 0x040055AE RID: 21934
private bool toggleResetTime;
// Token: 0x040055AF RID: 21935
public AnimationCurve CurveX = new AnimationCurve(new Keyframe[]
{
new Keyframe(0f, 0f, 3f, 3f),
new Keyframe(1f, 1f)
});
// Token: 0x040055B0 RID: 21936
public AnimationCurve CurveY = new AnimationCurve(new Keyframe[]
{
new Keyframe(0f, 0f, 3f, 3f),
new Keyframe(1f, 1f)
});
// Token: 0x040055B1 RID: 21937
public AnimationCurve CurveZ = new AnimationCurve(new Keyframe[]
{
new Keyframe(0f, 0f, 3f, 3f),
new Keyframe(1f, 1f)
});
}
}