private void Awake() { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), (Func <M0, bool>)(_ => this.isForceLoop)), (Action <M0>)(_ => { AnimatorStateInfo animatorStateInfo = this.animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo) ref animatorStateInfo).get_loop() || (double)((AnimatorStateInfo) ref animatorStateInfo).get_normalizedTime() < 1.0) { return; } this.animator.Play(this.nameHadh, 0, 0.0f); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), (Action <M0>)(_ => { if (!this.isSon || !Object.op_Implicit((Object)this.transSon)) { return; } this.transSon.set_localScale(new Vector3(this.oiCharInfo.sonLength, this.oiCharInfo.sonLength, this.oiCharInfo.sonLength)); })); }
private void Start() { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), (Func <M0, bool>)(_ => this.enable)), (Action <M0>)(_ => { for (int index = 0; index < this.pv.Length; ++index) { if (this._enable[index]) { this.bone[index].get_transform().CopyPosRotScl(this.pv[index].get_transform()); } } })); }
protected override void Awake() { if (!this.CheckInstance()) { return; } Object.DontDestroyOnLoad((Object)((Component)this).get_gameObject()); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), (Action <M0>)(_ => { for (int index = 0; index < this.tail; ++index) { if (this.arrayUpdatable[index] != null) { this.arrayUpdatable[index].LateUpdateFunc(); } } })), (Component)this); }
public void SetupSea() { if (((IList <Renderer>) this.renderersSea).IsNullOrEmpty <Renderer>()) { return; } ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), 1), (Action <M0>)(_ => { using (IEnumerator <Renderer> enumerator = ((IEnumerable <Renderer>) this.renderersSea).Where <Renderer>((Func <Renderer, bool>)(v => Object.op_Inequality((Object)v, (Object)null))).GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { Renderer current = enumerator.Current; Material material = current.get_material(); material.DisableKeyword("USINGWATERVOLUME"); current.set_material(material); } } })); }
public void SetEnviroParticleTarget(Transform target) { if (Object.op_Equality((Object)target, (Object)null)) { return; } GameObject envParRoot = this.EnviroParticleRoot; if (Object.op_Equality((Object)envParRoot, (Object)null)) { return; } if (this._enviroParticleFollowDisposable != null) { this._enviroParticleFollowDisposable.Dispose(); } this._enviroParticleFollowDisposable = ObservableExtensions.Subscribe <Unit>(Observable.TakeUntilDestroy <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)envParRoot.get_transform()), (Component)target), (System.Action <M0>)(_ => { Vector3 position = target.get_position(); if (this._enviroParticleFollowTargetHeight) { ref Vector3 local = ref position; local.y = (__Null)(local.y + (double)this._enviroParticleHeight); }