private void LateUpdate() { if (this.m_fStartTime == 0f) { return; } if (this.m_fDelayTime != 0f) { if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime) { return; } this.m_fDelayTime = 0f; base.InitAnimationTimer(); if (base.GetComponent <Renderer>()) { base.GetComponent <Renderer>().set_enabled(true); } } float time = this.m_Timer.GetTime(); float fElapsedRate = time; if (this.m_fDurationTime != 0f) { fElapsedRate = time / this.m_fDurationTime; } this.UpdateAnimation(fElapsedRate); }
private void LateUpdate() { if (this.m_fStartTime == 0f) { return; } if (!this.m_fDelayTimeComplete) { if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime) { return; } this.m_fDelayTimeComplete = true; base.InitAnimationTimer(); if (this.thisRenderer) { this.thisRenderer.enabled = true; } } float time = this.m_Timer.GetTime(); float fElapsedRate = time; if (this.m_fDurationTime != 0f) { fElapsedRate = time / this.m_fDurationTime; } this.UpdateAnimation(fElapsedRate); }
private void LateUpdate() { if (this.m_fStartTime != 0f) { if (this.m_fDelayTime != 0f) { if (NcEffectBehaviour.GetEngineTime() < (this.m_fStartTime + this.m_fDelayTime)) { return; } this.m_fDelayTime = 0f; base.InitAnimationTimer(); if (base.GetRenderer() != null) { base.GetRenderer().enabled = true; } } float time = base.m_Timer.GetTime(); float fElapsedRate = time; if (this.m_fDurationTime != 0f) { fElapsedRate = time / this.m_fDurationTime; } this.UpdateAnimation(fElapsedRate); } }
private void Update() { if (this.m_AudioClip == null) { base.enabled = false; return; } if (!this.m_bEnable) { return; } if (!this.m_bStartAttach) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_bStartAttach = true; } if (this.m_fStartTime + ((this.m_nCreateCount != 0) ? this.m_fRepeatTime : this.m_fDelayTime) <= NcEffectBehaviour.GetEngineTime()) { this.CreateAttachSound(); if (0f < this.m_fRepeatTime && (this.m_nRepeatCount == 0 || this.m_nCreateCount < this.m_nRepeatCount)) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); } else { this.m_bEnable = false; } } }
private void Update() { if (this.m_AudioClip == null) { base.set_enabled(false); return; } if (!this.m_bStartAttach) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_bStartAttach = true; } if (this.m_fStartTime + this.m_fDelayTime <= NcEffectBehaviour.GetEngineTime()) { this.CreateAttachSound(); if (0f < this.m_fRepeatTime && (this.m_nRepeatCount == 0 || this.m_nCreateCount < this.m_nRepeatCount)) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_fDelayTime = this.m_fRepeatTime; } else { base.set_enabled(false); } } }
private void LateUpdate() { if (this.m_fStartTime == 0f) { return; } if (!base.IsStartAnimation() && this.m_fDelayTime != 0f) { if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime) { return; } base.InitAnimationTimer(); if (base.renderer) { base.renderer.enabled = true; } } float num = this.m_Timer.GetTime() + this.m_fAddElapsedTime; float fElapsedRate = num; if (this.m_fDurationTime != 0f) { fElapsedRate = num / this.m_fDurationTime; } this.UpdateAnimation(fElapsedRate); }
private void Start() { this.isStarted = true; this.m_size = new Vector2(1f / (float)this.m_nTilingX, 1f / (float)this.m_nTilingY); this.m_Renderer = base.renderer; this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_nFrameCount = ((this.m_nFrameCount > 0) ? this.m_nFrameCount : (this.m_nTilingX * this.m_nTilingY)); if (this.m_Renderer == null) { base.enabled = false; return; } if (this.m_PlayMode == NcSpriteAnimation.PLAYMODE.SELECT) { this.SetIndex(this.m_nSelectFrame); } else { if (0f < this.m_fDelayTime) { this.m_Renderer.enabled = false; return; } if (this.m_PlayMode == NcSpriteAnimation.PLAYMODE.RANDOM) { this.SetIndex(UnityEngine.Random.Range(0, this.m_nFrameCount - 1)); } else { base.InitAnimationTimer(); this.SetIndex(0); } } }
private void Init() { this.m_bSleep = false; this.m_nCreateCount = 0; this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_fEmitStartTime = 0f; }
private void Update() { if (0f < this.m_fStartChangeTime) { if (0f < this.m_fChangeTime) { float num = (NcEffectBehaviour.GetEngineTime() - this.m_fStartChangeTime) / this.m_fChangeTime; if (1f < num) { num = 1f; if (this.m_bAutoDeactive && this.m_fToMeshValue <= 0f) { NcEffectBehaviour.SetActiveRecursively(base.gameObject, false); } } this.ChangeToAlpha(num); } else { this.ChangeToAlpha(1f); } } else if (0f < this.m_fStartTime && this.m_fStartTime + this.m_fDelayTime <= NcEffectBehaviour.GetEngineTime()) { this.StartChange(); } }
private void Update() { if (this.m_PlayMode == NcSpriteAnimation.PLAYMODE.SELECT) { return; } if (this.m_Renderer == null || this.m_nTilingX * this.m_nTilingY == 0) { return; } if (this.m_fDelayTime != 0f) { if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime) { return; } this.m_fDelayTime = 0f; base.InitAnimationTimer(); this.m_Renderer.set_enabled(true); } if (this.m_PlayMode != NcSpriteAnimation.PLAYMODE.RANDOM) { int num = (int)(this.m_Timer.GetTime() * this.m_fFps); if (num == 0 && this.m_NcSpriteFactoryCom != null) { this.m_NcSpriteFactoryCom.OnAnimationStartFrame(this); } if (this.m_NcSpriteFactoryCom != null && this.m_nFrameCount <= 0) { this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, 0); } else { if (((this.m_PlayMode != NcSpriteAnimation.PLAYMODE.PINGPONG) ? this.m_nFrameCount : (this.m_nFrameCount * 2 - 1)) <= num) { if (!this.m_bLoop) { if (this.m_NcSpriteFactoryCom != null && this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, 1)) { return; } this.UpdateEndAnimation(); return; } else if (this.m_PlayMode == NcSpriteAnimation.PLAYMODE.PINGPONG) { if (this.m_NcSpriteFactoryCom != null && num % (this.m_nFrameCount * 2 - 2) == 1 && this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, num / (this.m_nFrameCount * 2 - 1))) { return; } } else if (this.m_NcSpriteFactoryCom != null && num % this.m_nFrameCount == 0 && this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, num / this.m_nFrameCount)) { return; } } this.SetIndex(num); } } }
private void Update() { if (this.m_AttachPrefab == null) { return; } if (this.m_AttachType == NcAttachPrefab.AttachType.Active) { if (!this.m_bStartAttach) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_bStartAttach = true; } if (this.m_fStartTime + this.m_fDelayTime <= NcEffectBehaviour.GetEngineTime()) { this.CreateAttachPrefab(); if ((0f < this.m_fRepeatTime && this.m_nRepeatCount == 0) || this.m_nCreateCount < this.m_nRepeatCount) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_fDelayTime = this.m_fRepeatTime; } else { base.set_enabled(false); } } } }
private void Update() { if (this.m_bDisabledEmit) { return; } if (0f < this.m_fStartDelayTime) { if (this.m_fStartTime + this.m_fStartDelayTime <= NcEffectBehaviour.GetEngineTime()) { this.m_fEmitStartTime = NcEffectBehaviour.GetEngineTime(); this.m_fDurationStartTime = NcEffectBehaviour.GetEngineTime(); this.m_fStartDelayTime = 0f; this.SetEnableParticle(true); } return; } if (this.m_bBurst) { if (this.m_fDurationStartTime <= NcEffectBehaviour.GetEngineTime()) { if (this.m_nBurstRepeatCount == 0 || this.m_nCreateCount < this.m_nBurstRepeatCount) { this.m_fDurationStartTime = this.m_fBurstRepeatTime + NcEffectBehaviour.GetEngineTime(); this.m_nCreateCount++; if (this.IsShuriken()) { this.m_ps.Emit(this.m_fBurstEmissionCount); } else if (this.m_pe != null) { this.m_pe.Emit(this.m_fBurstEmissionCount); } } } } else if (this.m_bSleep) { if (this.m_fEmitStartTime + this.m_fEmitTime + this.m_fSleepTime < NcEffectBehaviour.GetEngineTime()) { this.SetEnableParticle(true); this.m_fEmitStartTime = NcEffectBehaviour.GetEngineTime(); this.m_bSleep = false; } } else if (0f < this.m_fEmitTime && this.m_fEmitStartTime + this.m_fEmitTime < NcEffectBehaviour.GetEngineTime()) { this.m_nCreateCount++; this.SetEnableParticle(false); if (0f < this.m_fSleepTime) { this.m_bSleep = true; } else { this.m_fEmitTime = 0f; } } }
private void StartDestroy() { this.m_fStartDestroyTime = NcEffectBehaviour.GetEngineTime(); if (this.m_bDisableEmit) { base.DisableEmit(); } }
private void Start() { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); if (this.m_bEndNcCurveAnimation) { this.m_NcCurveAnimation = base.GetComponent <NcCurveAnimation>(); } }
private void Start() { if (this.m_bInvoke) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.CreateCloneObject(); base.InvokeRepeating("CreateCloneObject", this.m_fDuplicateTime, this.m_fDuplicateTime); } }
private void Update() { if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime) { return; } if (this.m_fTurnSpeed != 0f) { base.get_transform().Rotate(base.get_transform().get_up() * NcEffectBehaviour.GetEngineDeltaTime() * this.m_fTurnSpeed, 0); } }
private void Update() { if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime) { return; } if (this.m_fTurnSpeed != 0f) { base.transform.Rotate(base.transform.up * NcEffectBehaviour.GetEngineDeltaTime() * this.m_fTurnSpeed, Space.World); } }
private void Update() { if ((this.m_enabled && (this.m_PlayMode != PLAYMODE.SELECT)) && ((this.m_Renderer != null) && ((this.m_nTilingX * this.m_nTilingY) != 0))) { if (this.m_fDelayTime != 0f) { if (NcEffectBehaviour.GetEngineTime() < (this.m_fStartTime + this.m_fDelayTime)) { return; } this.m_fDelayTime = 0f; base.InitAnimationTimer(); this.m_Renderer.enabled = true; } if (this.m_PlayMode != PLAYMODE.RANDOM) { int nSeqIndex = (int)(base.m_Timer.GetTime() * this.m_fFps); if ((nSeqIndex == 0) && (this.m_NcSpriteFactoryCom != null)) { this.m_NcSpriteFactoryCom.OnAnimationStartFrame(this); } if ((this.m_NcSpriteFactoryCom != null) && (this.m_nFrameCount <= 0)) { this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, 0); } else { if (((this.m_PlayMode != PLAYMODE.PINGPONG) ? this.m_nFrameCount : ((this.m_nFrameCount * 2) - 1)) <= nSeqIndex) { if (!this.m_bLoop) { if ((this.m_NcSpriteFactoryCom == null) || !this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, 1)) { this.UpdateEndAnimation(); } return; } if (this.m_PlayMode == PLAYMODE.PINGPONG) { if (((this.m_NcSpriteFactoryCom != null) && ((nSeqIndex % ((this.m_nFrameCount * 2) - 2)) == 1)) && this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, nSeqIndex / ((this.m_nFrameCount * 2) - 1))) { return; } } else if (((this.m_NcSpriteFactoryCom != null) && ((nSeqIndex % this.m_nFrameCount) == 0)) && this.m_NcSpriteFactoryCom.OnAnimationLastFrame(this, nSeqIndex / this.m_nFrameCount)) { return; } } this.SetIndex(nSeqIndex); } } } }
private void ResetLocalValue() { this.m_size = new Vector2(1f / (float)this.m_nTilingX, 1f / (float)this.m_nTilingY); this.m_Renderer = base.GetComponent <Renderer>(); this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_nFrameCount = ((this.m_nFrameCount > 0) ? this.m_nFrameCount : (this.m_nTilingX * this.m_nTilingY)); this.m_nLastIndex = -999; this.m_nLastSeqIndex = -1; this.m_bInPartLoop = false; this.m_bBreakLoop = false; }
public override int GetAnimationState() { if (!base.enabled || !NcEffectBehaviour.IsActive(base.gameObject)) { return(-1); } if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime + 0.1f) { return(1); } return(-1); }
private void Update() { if (this.m_bInvoke) { return; } if ((this.m_nDuplicateCount == 0 || this.m_nCreateCount < this.m_nDuplicateCount) && this.m_fStartTime + this.m_fDuplicateTime <= NcEffectBehaviour.GetEngineTime()) { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.CreateCloneObject(); } }
public NcParticleSpiral.SpiralSettings randomizeEffect(bool killCurrent) { if (killCurrent) { this.killCurrentEffects(); } this.RandomizeEditor(); this.SpawnEffect(); this.timeOfLastSpawn = NcEffectBehaviour.GetEngineTime(); this.spawnCount++; return(this.getSettings()); }
private void Start() { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); if (this.m_ParticlePrefab == null) { ParticleEmitter component = base.GetComponent <ParticleEmitter>(); if (component == null) { return; } component.emit = false; } this.defaultSettings = this.getSettings(); }
private void InitTrailObject() { this.m_base = base.transform; this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_LastPosition = base.transform.position; this.m_TrialObject = new GameObject("Trail"); this.m_TrialObject.transform.position = Vector3.zero; this.m_TrialObject.transform.rotation = Quaternion.identity; this.m_TrialObject.transform.localScale = base.transform.localScale; this.m_TrialObject.AddComponent(typeof(MeshFilter)); this.m_TrialObject.AddComponent(typeof(MeshRenderer)); this.m_TrialObject.renderer.sharedMaterial = base.renderer.sharedMaterial; this.m_TrailMesh = this.m_TrialObject.GetComponent <MeshFilter>().mesh; base.CreateEditorGameObject(this.m_TrialObject); }
private void InitTrailObject() { this.m_base = base.get_transform(); this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.m_LastPosition = base.get_transform().get_position(); this.m_TrialObject = new GameObject("Trail"); this.m_TrialObject.get_transform().set_position(Vector3.get_zero()); this.m_TrialObject.get_transform().set_rotation(Quaternion.get_identity()); this.m_TrialObject.get_transform().set_localScale(base.get_transform().get_localScale()); this.m_TrialObject.AddComponent(typeof(MeshFilter)); this.m_TrialObject.AddComponent(typeof(MeshRenderer)); this.m_TrialObject.GetComponent <Renderer>().set_material(base.GetComponent <Renderer>().get_material()); this.m_TrailMesh = this.m_TrialObject.GetComponent <MeshFilter>().get_mesh(); base.CreateEditorGameObject(this.m_TrialObject); }
private void LateUpdate() { if (NcEffectBehaviour.GetEngineTime() < this.m_fStartTime + this.m_fDelayTime) { return; } float num = NcEffectBehaviour.GetEngineTime() - this.timeOfLastSpawn; if (this.m_fSpawnRate <= num && this.spawnCount < this.m_nNumberOfSpawns) { this.SpawnEffect(); this.timeOfLastSpawn = NcEffectBehaviour.GetEngineTime(); this.spawnCount++; } }
private void OnEnable() { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.InitAnimation(); if (0f < this.m_fDelayTime) { if (base.GetComponent <Renderer>()) { base.GetComponent <Renderer>().set_enabled(false); } return; } base.InitAnimationTimer(); this.UpdateAnimation(0f); }
private void Start() { this.m_fStartTime = NcEffectBehaviour.GetEngineTime(); this.InitAnimation(); if (0f < this.m_fDelayTime) { if (base.GetRenderer()) { base.GetRenderer().enabled = false; } return; } base.InitAnimationTimer(); this.UpdateAnimation(0f); }
public override void ResetAnimation() { this.m_NcTansform.CopyToLocalTransform(base.transform); this.m_fStartTime = NcEffectBehaviour.GetEngineTime() - this.m_fAddElapsedTime; this.m_Transform = null; this.m_ChildRenderers = null; this.m_ChildColorNames = null; base.ResetAnimation(); if (0f < this.m_fDelayTime) { this.m_Timer = null; } this.InitAnimation(); this.UpdateAnimation(0f); }
private void StartDestroy() { if (this.m_fSmoothDestroyTime <= 0f) { this.AutoDestruct(); } else { this.m_fStartDestroyTime = NcEffectBehaviour.GetEngineTime(); if (this.m_bDisableEmit) { base.DisableEmit(); } } }