// Token: 0x06004879 RID: 18553 RVA: 0x001A47A8 File Offset: 0x001A29A8
 private void EndState(TeleportToListOfAreasBehavior.TeleportState state)
 {
     if (state == TeleportToListOfAreasBehavior.TeleportState.TeleportOut)
     {
         this.m_shadowSprite.renderer.enabled = false;
         if (this.hasOutlinesDuringAnim)
         {
             SpriteOutlineManager.ToggleOutlineRenderers(this.m_aiActor.sprite, false);
         }
         if (this.teleportOutBulletScript != null && !this.teleportOutBulletScript.IsNull && this.m_shouldFire)
         {
             SpawnManager.SpawnBulletScript(this.m_aiActor, this.teleportOutBulletScript, null, null, false, null);
             this.m_shouldFire = false;
         }
     }
     else if (state == TeleportToListOfAreasBehavior.TeleportState.TeleportIn)
     {
         if (this.teleportRequiresTransparency && this.m_cachedShader)
         {
             this.m_aiActor.sprite.usesOverrideMaterial = false;
             this.m_aiActor.renderer.material.shader    = this.m_cachedShader;
             this.m_cachedShader = null;
         }
         if (this.shadowSupport == TeleportToListOfAreasBehavior.ShadowSupport.Fade)
         {
             this.m_shadowSprite.color = this.m_shadowSprite.color.WithAlpha(1f);
         }
         if (this.m_aiActor.knockbackDoer)
         {
             this.m_aiActor.knockbackDoer.SetImmobile(false, "teleport");
         }
         this.m_aiActor.specRigidbody.CollideWithOthers = true;
         this.m_aiActor.IsGone = false;
         if (this.m_aiShooter)
         {
             this.m_aiShooter.ToggleGunAndHandRenderers(true, "TeleportToListOfAreasBehavior");
         }
         if (this.teleportInBulletScript != null && !this.teleportInBulletScript.IsNull && this.m_shouldFire)
         {
             SpawnManager.SpawnBulletScript(this.m_aiActor, this.teleportInBulletScript, null, null, false, null);
             this.m_shouldFire = false;
         }
         if (!this.hasOutlinesDuringAnim)
         {
             SpriteOutlineManager.ToggleOutlineRenderers(this.m_aiActor.sprite, true);
         }
     }
 }
 // Token: 0x06004878 RID: 18552 RVA: 0x001A4488 File Offset: 0x001A2688
 private void BeginState(TeleportToListOfAreasBehavior.TeleportState state)
 {
     if (state == TeleportToListOfAreasBehavior.TeleportState.TeleportOut)
     {
         if (this.teleportOutBulletScript != null && !this.teleportOutBulletScript.IsNull)
         {
             this.m_shouldFire = true;
         }
         if (this.teleportRequiresTransparency)
         {
             this.m_cachedShader = this.m_aiActor.renderer.material.shader;
             this.m_aiActor.sprite.usesOverrideMaterial = true;
             this.m_aiActor.renderer.material.shader    = ShaderCache.Acquire("Brave/LitBlendUber");
         }
         this.m_aiAnimator.PlayUntilCancelled(this.teleportOutAnim, true, null, -1f, false);
         if (this.shadowSupport == TeleportToListOfAreasBehavior.ShadowSupport.Animate)
         {
             this.m_shadowSprite.spriteAnimator.PlayAndForceTime(this.shadowOutAnim, this.m_aiAnimator.CurrentClipLength);
         }
         if (this.m_aiActor.knockbackDoer)
         {
             this.m_aiActor.knockbackDoer.SetImmobile(true, "teleport");
         }
         this.m_aiActor.ClearPath();
         if (!this.AttackableDuringAnimation)
         {
             this.m_aiActor.specRigidbody.CollideWithOthers = false;
             this.m_aiActor.IsGone = true;
         }
         if (this.m_aiShooter)
         {
             this.m_aiShooter.ToggleGunAndHandRenderers(false, "TeleportToListOfAreasBehavior");
         }
         if (!this.hasOutlinesDuringAnim)
         {
             SpriteOutlineManager.ToggleOutlineRenderers(this.m_aiActor.sprite, false);
         }
     }
     else if (state == TeleportToListOfAreasBehavior.TeleportState.Gone)
     {
         if (this.GoneTime <= 0f)
         {
             this.SetState(TeleportToListOfAreasBehavior.TeleportState.GoneBehavior);
             return;
         }
         this.m_timer = this.GoneTime;
         this.m_aiActor.specRigidbody.CollideWithOthers = false;
         this.m_aiActor.IsGone = true;
         this.m_aiActor.sprite.renderer.enabled = false;
     }
     else if (this.State == TeleportToListOfAreasBehavior.TeleportState.GoneBehavior)
     {
         if (this.goneAttackBehavior == null)
         {
             this.SetState(TeleportToListOfAreasBehavior.TeleportState.TeleportIn);
             return;
         }
         BehaviorResult behaviorResult = this.goneAttackBehavior.Update();
         if (behaviorResult != BehaviorResult.RunContinuous && behaviorResult != BehaviorResult.RunContinuousInClass)
         {
             this.SetState(TeleportToListOfAreasBehavior.TeleportState.TeleportIn);
         }
     }
     else if (state == TeleportToListOfAreasBehavior.TeleportState.TeleportIn)
     {
         if (this.teleportInBulletScript != null && !this.teleportInBulletScript.IsNull)
         {
             this.m_shouldFire = true;
         }
         this.DoTeleport();
         this.m_aiAnimator.PlayUntilFinished(this.teleportInAnim, true, null, -1f, false);
         if (this.shadowSupport == TeleportToListOfAreasBehavior.ShadowSupport.Animate)
         {
             this.m_shadowSprite.spriteAnimator.PlayAndForceTime(this.shadowInAnim, this.m_aiAnimator.CurrentClipLength);
         }
         this.m_shadowSprite.renderer.enabled = true;
         if (this.AttackableDuringAnimation)
         {
             this.m_aiActor.specRigidbody.CollideWithOthers = true;
             this.m_aiActor.IsGone = false;
         }
         this.m_aiActor.sprite.renderer.enabled = true;
         if (this.m_aiShooter)
         {
             this.m_aiShooter.ToggleGunAndHandRenderers(false, "TeleportToListOfAreasBehavior");
         }
         if (this.hasOutlinesDuringAnim)
         {
             SpriteOutlineManager.ToggleOutlineRenderers(this.m_aiActor.sprite, true);
         }
     }
 }
 private void SetState(TeleportToListOfAreasBehavior.TeleportState value)
 {
     this.EndState(this.m_state);
     this.m_state = value;
     this.BeginState(this.m_state);
 }