//****************************************************************************************************************************** // // FUNCTIONS // //****************************************************************************************************************************** //////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected override void ProjectileRaycast() { base.ProjectileRaycast(); // Play particle effect stream if (FiringEffect != null && !_FlamethrowerStreamIsPlaying) { // Spawn _FlamethrowerStreamEffect = ObjectPooling.Spawn(FiringEffect).GetComponentInChildren <ParticleSystem>(); _FlamethrowerStreamEffect.GetComponentInChildren <ParticleBasedDamage>().SetWeaponAttached(this); _FlamethrowerStreamEffect.transform.position = _MuzzleLaunchPoints[_MuzzleIterator].position; _FlamethrowerStreamEffect.transform.rotation = _MuzzleLaunchPoints[_MuzzleIterator].rotation; // Play _FlamethrowerStreamEffect.Stop(); var main = _FlamethrowerStreamEffect.main; main.duration = FiringDuration; _FlamethrowerStreamEffect.Play(); _FlamethrowerStreamIsPlaying = true; if (LoopingFire) { // Despawn the effect AutoDespawn auto = _FlamethrowerStreamEffect.GetComponentInParent <AutoDespawn>(); StartCoroutine(StopFlamethrowerStream()); StartCoroutine(auto.DelayedDespawnSeconds((int)FiringDuration)); } } }
private void CreateSkillAlone() { object[] args = new object[] { "Game/SkillPrefab/SkillAlone", base.ClassID, "Effect" }; this.good = GameLogic.EffectGet(Utils.GetString(args)); this.good.transform.SetParent(GameNode.m_PoolParent); this.mAutoDespawn = this.good.GetComponent <AutoDespawn>(); if (this.mAutoDespawn != null) { this.mAutoDespawn.enabled = false; } this.mParticle = this.good.GetComponentInChildren <ParticleSystem>(); this.good.SetActive(false); }
protected override void OnUninstall() { ReleaseModeManager mode = GameLogic.Release.Mode; mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom)); base.m_Entity.Event_PositionBy -= new Action <Vector3>(this.OnPositionBy); this.ctrl.DeInit(); this.mAutoDespawn = this.good.GetComponent <AutoDespawn>(); if (this.mAutoDespawn == null) { this.mAutoDespawn = this.good.AddComponent <AutoDespawn>(); } this.mAutoDespawn.SetDespawnTime(5f); this.mAutoDespawn.enabled = true; this.KillSequence(); }