/// <summary> /// On Start(), we grab our particle emitter if there's one, and setup our fuel reserves /// </summary> protected override void Initialization() { base.Initialization(); _lucyHealth = GetComponent <Health>(); _characterHandleEMP = GetComponent <CharacterHandleEMP>(); if (ParticleEmitter != null) { _initialPosition = ParticleEmitter.transform.localPosition; ParticleSystem.EmissionModule emissionModule = ParticleEmitter.emission; emissionModule.enabled = false; } if (EffectParticleEmitter != null) { _effectInitialPosition = EffectParticleEmitter.transform.localPosition; ParticleSystem.EmissionModule effectEmissionModule = EffectParticleEmitter.emission; effectEmissionModule.enabled = false; } FlamethrowerFuelDurationLeft = JetpackFuelDuration; _jetpackRefuelCooldownWFS = new WaitForSeconds(JetpackRefuelCooldown); if (GUIManager.Instance != null && _character.CharacterType == Character.CharacterTypes.Player) { GUIManager.Instance.SetJetpackBar(!JetpackUnlimited, _character.PlayerID); UpdateFlamethrowerBar(); } }
protected override void Setup() { base.Setup(); _animator = GetComponent <Animator>(); _characterHandleEMP = GetComponent <CharacterHandleEMP>(); _lucyHealth = GetComponent <LucyHealth>(); _magnetEffect = GetComponent <LucyMagnet>(); _characterHandleMelee = GetComponent <CharacterHandleMelee>(); _walljump = GetComponent <LucyWallJump>(); _wallcling = GetComponent <LucyWallClinging>(); _lucyFlamethrower = GetComponent <LucyFlamethrower>(); _characterRun = GetComponent <CharacterRun>(); _plasmaRainbow = GetComponent <_2dxFX_PlasmaRainbow>(); PowerNodesCollected = 0; StartCoroutine(AddItemsToInventory()); StartCoroutine(GetTheRightSuitOn()); }
/// Override this to describe what happens when the object gets picked /// </summary> protected override void Pick() { base.Pick(); _animator = _collider.GetComponent <Animator> (); _sprite = gameObject.GetComponent <SpriteRenderer> (); _characterHandleEMP = _collider.GetComponent <CharacterHandleEMP>(); _animator.runtimeAnimatorController = Resources.Load("SuperSuitSuperBlasterAnimator") as RuntimeAnimatorController; _sprite.enabled = false; _characterHandleEMP.AbilityPermitted = true; //if we haven't already obtained it if (!GameManager.Instance.EMPObtained) { if (!GameManager.Instance.DebugMode) { RunSplashScreen(); } GameManager.Instance.EMPObtained = true; RetroAdventureProgressManager.Instance.SaveProgress(); } }