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.
|
|
|
|
using System;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace FX
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x02000742 RID: 1858
|
|
|
|
|
public class FX_GenerateFan : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x06002FEC RID: 12268 RVA: 0x00100888 File Offset: 0x00100888
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
|
|
|
|
for (int i = this.ObjNumber; i >= 1; i--)
|
|
|
|
|
{
|
|
|
|
|
Vector3 vector = new Vector3(base.gameObject.transform.eulerAngles.x + this.RotateFanEnd[0] * (float)(i - 1) / (float)(this.ObjNumber - 1), base.gameObject.transform.eulerAngles.y + this.RotateFanEnd[1] * (float)(i - 1) / (float)(this.ObjNumber - 1), base.gameObject.transform.eulerAngles.z + this.RotateFanEnd[2] * (float)(i - 1) / (float)(this.ObjNumber - 1));
|
|
|
|
|
GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(this.GenerateObject);
|
|
|
|
|
gameObject.transform.position = new Vector3(base.gameObject.transform.position.x + Mathf.Sin(vector[1] * 0.017453292f) * (float)this.ObjRadius, base.gameObject.transform.position.y, base.gameObject.transform.position.z + Mathf.Cos(vector[1] * 0.017453292f) * (float)this.ObjRadius);
|
|
|
|
|
gameObject.transform.eulerAngles = new Vector3(vector[0], vector[1], vector[2]);
|
|
|
|
|
gameObject.transform.parent = base.transform;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400557C RID: 21884
|
|
|
|
|
public GameObject GenerateObject;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400557D RID: 21885
|
|
|
|
|
public int ObjNumber = 6;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400557E RID: 21886
|
|
|
|
|
public int ObjRadius = 1;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400557F RID: 21887
|
|
|
|
|
public bool SaveRotate = true;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04005580 RID: 21888
|
|
|
|
|
public Vector3 RotateFanEnd = new Vector3(0f, 0f, 0f);
|
|
|
|
|
}
|
|
|
|
|
}
|