using System; using UnityEngine; namespace FX { // Token: 0x02000769 RID: 1897 public class FX_ch_002009 : MonoBehaviour { // Token: 0x0600305B RID: 12379 RVA: 0x00103CD4 File Offset: 0x00103CD4 private void Start() { if (this._parent != null) { GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); gameObject.transform.position = this._parent.transform.position + gameObject.transform.position; gameObject.transform.parent = this._parent.transform; this.animator = gameObject.GetComponent(); Renderer component = gameObject.GetComponent(); this._material = ((!(component != null)) ? null : component.material); this._propertyID_ValueName1 = Shader.PropertyToID(this.valueName1); this._propertyID_ValueName2 = Shader.PropertyToID(this.valueName2); } } // Token: 0x0600305C RID: 12380 RVA: 0x00103D94 File Offset: 0x00103D94 private void Update() { this.talePosition[0] = (this.talePosition[0] + this.previousWorldPosition - base.gameObject.transform.position) * this.sk; if (Mathf.Abs(this.talePosition[0].x) >= 1f) { this.talePosition[0].x = Mathf.Sign(this.talePosition[0].x); } this.talePosition[1].x = Mathf.Abs(this.talePosition[0].x) - Mathf.Abs(this.talePosition[1].x); if (Mathf.Abs(this.talePosition[0].x) <= 0.001f) { this.talePosition[0].x = 0f; } if (Mathf.Abs(this.talePosition[1].x) <= 0.001f) { this.talePosition[1].x = 0f; } if (this._material != null) { this._material.SetFloat(this._propertyID_ValueName1, this.talePosition[0].x); this._material.SetFloat(this._propertyID_ValueName2, this.talePosition[1].x); } this.previousWorldPosition = base.gameObject.transform.position; this.talePosition[1] = this.talePosition[0]; } // Token: 0x0600305D RID: 12381 RVA: 0x00103F6C File Offset: 0x00103F6C private void TriggerEffectMotion(string _string) { this.animator.SetTrigger(_string); } // Token: 0x040056AA RID: 22186 [SerializeField] private GameObject GenerateObject; // Token: 0x040056AB RID: 22187 [SerializeField] private GameObject _parent; // Token: 0x040056AC RID: 22188 private Vector3 previousWorldPosition; // Token: 0x040056AD RID: 22189 private Vector3[] talePosition = new Vector3[2]; // Token: 0x040056AE RID: 22190 [SerializeField] private float sk = 0.97f; // Token: 0x040056AF RID: 22191 private string valueName1 = "_talePosition1"; // Token: 0x040056B0 RID: 22192 private string valueName2 = "_talePosition2"; // Token: 0x040056B1 RID: 22193 private Material _material; // Token: 0x040056B2 RID: 22194 private int _propertyID_ValueName1; // Token: 0x040056B3 RID: 22195 private int _propertyID_ValueName2; // Token: 0x040056B4 RID: 22196 private Animator animator; } }