Add source files
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// Token: 0x020000FD RID: 253
|
||||
public class BakedMeshAnimatorUpdater : MonoBehaviour
|
||||
{
|
||||
// Token: 0x060015B5 RID: 5557 RVA: 0x0019BAC8 File Offset: 0x00199CC8
|
||||
private void Start()
|
||||
{
|
||||
if (this.updateChildren)
|
||||
{
|
||||
this.children = base.transform.GetComponentsInChildren<BakedMeshAnimator>();
|
||||
for (int i = 0; i < this.children.Length; i++)
|
||||
{
|
||||
if (this.randomizeSpeed)
|
||||
{
|
||||
this.children[i].SetSpeedMultiplier(Random.Range(this.minSpeedMultiplier, this.maxSpeedMultiplier));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.animatedMesh = base.GetComponent<BakedMeshAnimator>();
|
||||
if (this.randomizeSpeed)
|
||||
{
|
||||
this.animatedMesh.SetSpeedMultiplier(Random.Range(this.minSpeedMultiplier, this.maxSpeedMultiplier));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060015B6 RID: 5558 RVA: 0x0019BB58 File Offset: 0x00199D58
|
||||
private void Update()
|
||||
{
|
||||
if (this.updateChildren)
|
||||
{
|
||||
for (int i = 0; i < this.children.Length; i++)
|
||||
{
|
||||
this.children[i].AnimateUpdate();
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.animatedMesh.AnimateUpdate();
|
||||
}
|
||||
|
||||
// Token: 0x040025FA RID: 9722
|
||||
private BakedMeshAnimator animatedMesh;
|
||||
|
||||
// Token: 0x040025FB RID: 9723
|
||||
private BakedMeshAnimator[] children;
|
||||
|
||||
// Token: 0x040025FC RID: 9724
|
||||
public bool updateChildren;
|
||||
|
||||
// Token: 0x040025FD RID: 9725
|
||||
public bool randomizeSpeed;
|
||||
|
||||
// Token: 0x040025FE RID: 9726
|
||||
public float minSpeedMultiplier = 1f;
|
||||
|
||||
// Token: 0x040025FF RID: 9727
|
||||
public float maxSpeedMultiplier = 1f;
|
||||
}
|
||||
Reference in New Issue
Block a user