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.
286 lines
8.9 KiB
286 lines
8.9 KiB
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace FX
|
|
{
|
|
// Token: 0x02000764 RID: 1892
|
|
[RequireComponent(typeof(Image))]
|
|
[ExecuteInEditMode]
|
|
public class FX_UI_SummerLine : MonoBehaviour
|
|
{
|
|
// Token: 0x06003048 RID: 12360 RVA: 0x00102FAC File Offset: 0x00102FAC
|
|
private void Start()
|
|
{
|
|
if (null == this.material_)
|
|
{
|
|
this.material_ = new Material(this._summerLine_Shader);
|
|
this.material_.hideFlags = (HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild);
|
|
}
|
|
this.reset();
|
|
}
|
|
|
|
// Token: 0x06003049 RID: 12361 RVA: 0x00102FE4 File Offset: 0x00102FE4
|
|
private void OnDidApplyAnimationProperties()
|
|
{
|
|
this.reset();
|
|
}
|
|
|
|
// Token: 0x0600304A RID: 12362 RVA: 0x00102FEC File Offset: 0x00102FEC
|
|
private void OnDestroy()
|
|
{
|
|
if (null != this.material_)
|
|
{
|
|
UnityEngine.Object.DestroyImmediate(this.material_);
|
|
this.material_ = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600304B RID: 12363 RVA: 0x00103014 File Offset: 0x00103014
|
|
private void reset()
|
|
{
|
|
Image component = base.transform.GetComponent<Image>();
|
|
if (component == null)
|
|
{
|
|
return;
|
|
}
|
|
this.initPropertyId();
|
|
component.material = this.material_;
|
|
component.material.SetFloat(this.id_Opacity, this.Opacity_);
|
|
component.material.SetFloat(this.id_Use_Color_BG, (float)(this.Use_Color_BG_ ? 1 : 0));
|
|
component.material.SetColor(this.id_Color_A, this.Color_A_);
|
|
component.material.SetColor(this.id_Color_B, this.Color_B_);
|
|
component.material.SetColor(this.id_Color_C, this.Color_C_);
|
|
component.material.SetColor(this.id_Color_D, this.Color_D_);
|
|
component.material.SetColor(this.id_Color_E, this.Color_E_);
|
|
component.material.SetVector(this.id_ColorA_MinToMax, this.ColorA_MinToMax_);
|
|
component.material.SetVector(this.id_ColorB_MinToMax, this.ColorB_MinToMax_);
|
|
component.material.SetVector(this.id_ColorC_MinToMax, this.ColorC_MinToMax_);
|
|
component.material.SetVector(this.id_ColorD_MinToMax, this.ColorD_MinToMax_);
|
|
component.material.SetVector(this.id_ColorE_MinToMax, this.ColorE_MinToMax_);
|
|
component.material.SetFloat(this.id_Move_Distance, this.move_Distance_);
|
|
component.material.SetFloat(this.id_Move_Speed, this.move_Speed_);
|
|
component.material.SetFloat(this.id_Edge_Softness, this.edge_Softness_);
|
|
component.material.SetFloat(this.id_All_Polar_Cutout_Angle, this.all_Polar_Cutout_Angle_);
|
|
component.material.SetFloat(this.id_All_Polar_Cutout_Reverce, (float)(this.All_Polar_Cutout_Reverce_ ? 1 : 0));
|
|
component.material.SetFloat(this.id_All_Radius, this.all_Radius_);
|
|
component.material.SetFloat(this.id_All_Thickness, this.all_Thickness_);
|
|
component.material.SetFloat(this.id_All_MoonShape, this.all_MoonShape_);
|
|
component.material.SetFloat(this.id_All_RotateAngle, this.all_RotateAngle_);
|
|
component.material.SetVector(this.id_Offset_Center, this.offset_Center_);
|
|
component.material.SetVector(this.id_Offset_Scale, this.offset_Scale_);
|
|
}
|
|
|
|
// Token: 0x0600304C RID: 12364 RVA: 0x0010329C File Offset: 0x0010329C
|
|
private void initPropertyId()
|
|
{
|
|
if (this.id_Opacity != 0)
|
|
{
|
|
return;
|
|
}
|
|
this.id_Opacity = Shader.PropertyToID("_Opacity");
|
|
this.id_Use_Color_BG = Shader.PropertyToID("_Use_Color_BG");
|
|
this.id_Color_A = Shader.PropertyToID("_Color_A");
|
|
this.id_Color_B = Shader.PropertyToID("_Color_B");
|
|
this.id_Color_C = Shader.PropertyToID("_Color_C");
|
|
this.id_Color_D = Shader.PropertyToID("_Color_D");
|
|
this.id_Color_E = Shader.PropertyToID("_Color_E");
|
|
this.id_ColorA_MinToMax = Shader.PropertyToID("_ColorA_MinToMax");
|
|
this.id_ColorB_MinToMax = Shader.PropertyToID("_ColorB_MinToMax");
|
|
this.id_ColorC_MinToMax = Shader.PropertyToID("_ColorC_MinToMax");
|
|
this.id_ColorD_MinToMax = Shader.PropertyToID("_ColorD_MinToMax");
|
|
this.id_ColorE_MinToMax = Shader.PropertyToID("_ColorE_MinToMax");
|
|
this.id_Move_Distance = Shader.PropertyToID("_Move_Distance");
|
|
this.id_Move_Speed = Shader.PropertyToID("_Move_Speed");
|
|
this.id_Edge_Softness = Shader.PropertyToID("_Edge_Softness");
|
|
this.id_All_Polar_Cutout_Angle = Shader.PropertyToID("_All_Polar_Cutout_Angle");
|
|
this.id_All_Polar_Cutout_Reverce = Shader.PropertyToID("_All_Polar_Cutout_Reverce");
|
|
this.id_All_Radius = Shader.PropertyToID("_All_Radius");
|
|
this.id_All_Thickness = Shader.PropertyToID("_All_Thickness");
|
|
this.id_All_MoonShape = Shader.PropertyToID("_All_MoonShape");
|
|
this.id_All_RotateAngle = Shader.PropertyToID("_All_RotateAngle");
|
|
this.id_Offset_Center = Shader.PropertyToID("_Offset_Center");
|
|
this.id_Offset_Scale = Shader.PropertyToID("_Offset_Scale");
|
|
}
|
|
|
|
// Token: 0x04005648 RID: 22088
|
|
[SerializeField]
|
|
private Shader _summerLine_Shader;
|
|
|
|
// Token: 0x04005649 RID: 22089
|
|
[Range(0f, 1f)]
|
|
[SerializeField]
|
|
private float Opacity_ = 1f;
|
|
|
|
// Token: 0x0400564A RID: 22090
|
|
[SerializeField]
|
|
private bool Use_Color_BG_;
|
|
|
|
// Token: 0x0400564B RID: 22091
|
|
[SerializeField]
|
|
private Color Color_A_ = new Color(0.3924569f, 0.8274511f, 1f, 1f);
|
|
|
|
// Token: 0x0400564C RID: 22092
|
|
[SerializeField]
|
|
private Color Color_B_ = new Color(1f, 0.09803922f, 0.6705883f, 1f);
|
|
|
|
// Token: 0x0400564D RID: 22093
|
|
[SerializeField]
|
|
private Color Color_C_ = new Color(1f, 0.9450981f, 0f, 1f);
|
|
|
|
// Token: 0x0400564E RID: 22094
|
|
[SerializeField]
|
|
private Color Color_D_ = new Color(0.05882353f, 0.6431373f, 0.937255f, 1f);
|
|
|
|
// Token: 0x0400564F RID: 22095
|
|
[SerializeField]
|
|
private Color Color_E_ = new Color(0f, 0.9843138f, 0.9960785f, 1f);
|
|
|
|
// Token: 0x04005650 RID: 22096
|
|
[SerializeField]
|
|
private Vector2 ColorA_MinToMax_ = new Vector2(0.1f, 0.3f);
|
|
|
|
// Token: 0x04005651 RID: 22097
|
|
[SerializeField]
|
|
private Vector2 ColorB_MinToMax_ = new Vector2(0.2f, 0.45f);
|
|
|
|
// Token: 0x04005652 RID: 22098
|
|
[SerializeField]
|
|
private Vector2 ColorC_MinToMax_ = new Vector2(0.55f, 0.7f);
|
|
|
|
// Token: 0x04005653 RID: 22099
|
|
[SerializeField]
|
|
private Vector2 ColorD_MinToMax_ = new Vector2(0.75f, 0.83f);
|
|
|
|
// Token: 0x04005654 RID: 22100
|
|
[SerializeField]
|
|
private Vector2 ColorE_MinToMax_ = new Vector2(0.82f, 0.9f);
|
|
|
|
// Token: 0x04005655 RID: 22101
|
|
[Range(0f, 0.1f)]
|
|
[SerializeField]
|
|
private float move_Distance_ = 0.1f;
|
|
|
|
// Token: 0x04005656 RID: 22102
|
|
[Range(0f, 1f)]
|
|
[SerializeField]
|
|
private float move_Speed_ = 0.08f;
|
|
|
|
// Token: 0x04005657 RID: 22103
|
|
[Range(0f, 0.1f)]
|
|
[SerializeField]
|
|
private float edge_Softness_ = 0.0165f;
|
|
|
|
// Token: 0x04005658 RID: 22104
|
|
[Range(0f, 360f)]
|
|
[SerializeField]
|
|
private float all_Polar_Cutout_Angle_ = 240f;
|
|
|
|
// Token: 0x04005659 RID: 22105
|
|
[SerializeField]
|
|
private bool All_Polar_Cutout_Reverce_;
|
|
|
|
// Token: 0x0400565A RID: 22106
|
|
[Range(-1f, 2f)]
|
|
[SerializeField]
|
|
private float all_Radius_ = 0.5f;
|
|
|
|
// Token: 0x0400565B RID: 22107
|
|
[Range(0f, 1f)]
|
|
[SerializeField]
|
|
private float all_Thickness_ = 0.5f;
|
|
|
|
// Token: 0x0400565C RID: 22108
|
|
[Range(-1f, 1f)]
|
|
[SerializeField]
|
|
private float all_MoonShape_ = 0.25f;
|
|
|
|
// Token: 0x0400565D RID: 22109
|
|
[SerializeField]
|
|
private float all_RotateAngle_;
|
|
|
|
// Token: 0x0400565E RID: 22110
|
|
[SerializeField]
|
|
private Vector2 offset_Center_ = new Vector2(0f, 0f);
|
|
|
|
// Token: 0x0400565F RID: 22111
|
|
[SerializeField]
|
|
private Vector2 offset_Scale_ = new Vector2(1f, 1f);
|
|
|
|
// Token: 0x04005660 RID: 22112
|
|
private Material material_;
|
|
|
|
// Token: 0x04005661 RID: 22113
|
|
private int id_Opacity;
|
|
|
|
// Token: 0x04005662 RID: 22114
|
|
private int id_Use_Color_BG;
|
|
|
|
// Token: 0x04005663 RID: 22115
|
|
private int id_Color_A;
|
|
|
|
// Token: 0x04005664 RID: 22116
|
|
private int id_Color_B;
|
|
|
|
// Token: 0x04005665 RID: 22117
|
|
private int id_Color_C;
|
|
|
|
// Token: 0x04005666 RID: 22118
|
|
private int id_Color_D;
|
|
|
|
// Token: 0x04005667 RID: 22119
|
|
private int id_Color_E;
|
|
|
|
// Token: 0x04005668 RID: 22120
|
|
private int id_ColorA_MinToMax;
|
|
|
|
// Token: 0x04005669 RID: 22121
|
|
private int id_ColorB_MinToMax;
|
|
|
|
// Token: 0x0400566A RID: 22122
|
|
private int id_ColorC_MinToMax;
|
|
|
|
// Token: 0x0400566B RID: 22123
|
|
private int id_ColorD_MinToMax;
|
|
|
|
// Token: 0x0400566C RID: 22124
|
|
private int id_ColorE_MinToMax;
|
|
|
|
// Token: 0x0400566D RID: 22125
|
|
private int id_Move_Distance;
|
|
|
|
// Token: 0x0400566E RID: 22126
|
|
private int id_Move_Speed;
|
|
|
|
// Token: 0x0400566F RID: 22127
|
|
private int id_Edge_Softness;
|
|
|
|
// Token: 0x04005670 RID: 22128
|
|
private int id_All_Polar_Cutout_Angle;
|
|
|
|
// Token: 0x04005671 RID: 22129
|
|
private int id_All_Polar_Cutout_Reverce;
|
|
|
|
// Token: 0x04005672 RID: 22130
|
|
private int id_All_Radius;
|
|
|
|
// Token: 0x04005673 RID: 22131
|
|
private int id_All_Thickness;
|
|
|
|
// Token: 0x04005674 RID: 22132
|
|
private int id_All_MoonShape;
|
|
|
|
// Token: 0x04005675 RID: 22133
|
|
private int id_All_RotateAngle;
|
|
|
|
// Token: 0x04005676 RID: 22134
|
|
private int id_Offset_Center;
|
|
|
|
// Token: 0x04005677 RID: 22135
|
|
private int id_Offset_Scale;
|
|
|
|
// Token: 0x04005678 RID: 22136
|
|
private const HideFlags HideAndDontSave = HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild;
|
|
}
|
|
}
|