public override void OnSceneGUI(ParticleSystem system, InitialModuleUI initial)
{
Color color = Handles.color;
Handles.color = s_ShapeGizmoColor;
Matrix4x4 matrix = Handles.matrix;
EditorGUI.BeginChangeCheck();
int intValue = this.m_Type.intValue;
Matrix4x4 transform = new Matrix4x4();
float num2 = (intValue != 6) ? 1f : this.m_MeshScale.floatValue;
if (system.main.scalingMode == ParticleSystemScalingMode.Hierarchy)
{
transform.SetTRS(system.transform.position, system.transform.rotation, (Vector3) (system.transform.lossyScale * num2));
}
else
{
transform.SetTRS(system.transform.position, system.transform.rotation, (Vector3) (system.transform.localScale * num2));
}
Handles.matrix = transform;
switch (intValue)
{
case 0:
case 1:
this.m_Radius.floatValue = Handles.DoSimpleRadiusHandle(Quaternion.identity, Vector3.zero, this.m_Radius.floatValue, false);
break;
}
if ((intValue == 10) || (intValue == 11))
{
float floatValue = this.m_Radius.floatValue;
float arc = this.m_Arc.floatValue;
Handles.DoSimpleRadiusArcHandleXY(Quaternion.identity, Vector3.zero, ref floatValue, ref arc);
this.m_Radius.floatValue = floatValue;
this.m_Arc.floatValue = arc;
}
else if ((intValue == 2) || (intValue == 3))
{
this.m_Radius.floatValue = Handles.DoSimpleRadiusHandle(Quaternion.identity, Vector3.zero, this.m_Radius.floatValue, true);
}
else if ((intValue == 4) || (intValue == 7))
{
Vector3 radiusAngleRange = new Vector3(this.m_Radius.floatValue, this.m_Angle.floatValue, initial.m_Speed.scalar.floatValue);
radiusAngleRange = Handles.ConeFrustrumHandle(Quaternion.identity, Vector3.zero, radiusAngleRange);
this.m_Radius.floatValue = radiusAngleRange.x;
this.m_Angle.floatValue = radiusAngleRange.y;
initial.m_Speed.scalar.floatValue = radiusAngleRange.z;
}
else if ((intValue == 8) || (intValue == 9))
{
Vector3 vector2 = new Vector3(this.m_Radius.floatValue, this.m_Angle.floatValue, this.m_Length.floatValue);
vector2 = Handles.ConeFrustrumHandle(Quaternion.identity, Vector3.zero, vector2);
this.m_Radius.floatValue = vector2.x;
this.m_Angle.floatValue = vector2.y;
this.m_Length.floatValue = vector2.z;
}
else if (((intValue == 5) || (intValue == 15)) || (intValue == 0x10))
{
Vector3 zero = Vector3.zero;
Vector3 size = new Vector3(this.m_BoxX.floatValue, this.m_BoxY.floatValue, this.m_BoxZ.floatValue);
if (this.m_BoxEditor.OnSceneGUI(transform, s_ShapeGizmoColor, false, ref zero, ref size))
{
this.m_BoxX.floatValue = size.x;
this.m_BoxY.floatValue = size.y;
this.m_BoxZ.floatValue = size.z;
}
}
else if (intValue == 12)
{
this.m_Radius.floatValue = Handles.DoSimpleEdgeHandle(Quaternion.identity, Vector3.zero, this.m_Radius.floatValue);
}
else if (intValue == 6)
{
Mesh objectReferenceValue = (Mesh) this.m_Mesh.objectReferenceValue;
if (objectReferenceValue != null)
{
bool wireframe = GL.wireframe;
GL.wireframe = true;
this.m_Material.SetPass(0);
Graphics.DrawMeshNow(objectReferenceValue, transform);
GL.wireframe = wireframe;
}
}
if (EditorGUI.EndChangeCheck())
{
base.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner.Repaint();
}
Handles.color = color;
Handles.matrix = matrix;
}