Пример #1
0
 private void StopBeamSound()
 {
     if (this.xBeamSoundWrapper != null)
     {
         this.xBeamSoundWrapper.Stop();
         this.xBeamSoundWrapper = null;
         Program.game.xSoundSystem.PlayCue("Guardian_LaserBeamEnd", this.xOwner, true);
     }
 }
Пример #2
0
 public SoundSystem.CueWrapper PlayTrackableInterfaceCue(string sCueName)
 {
     if (!this.bSystemActive)
     {
         return null;
     }
     SoundSystem.CueWrapper xCue = new SoundSystem.CueWrapper(this.effectSoundBank.GetCue(sCueName), sCueName);
     this.lxCueWrappers.Add(xCue);
     this.lxCuesInLevel.Add(xCue);
     xCue.Play();
     return xCue;
 }
Пример #3
0
 public virtual void Update()
 {
     this.iCounter++;
     if (CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client && this.xOwnerView.xViewStats.GetSkillLevel(SpellCodex.SpellTypes._Talent_Turtle) > 0)
     {
         float fBuffFactor = SpellVariable.Get(SpellVariable.Handle.Talent_Turtle_DEFIncrease) * (float)this.xOwnerView.xViewStats.GetSkillLevel(SpellCodex.SpellTypes._Talent_Turtle) / 100f;
         this.xOwnerView.xEntity.xBaseStats.AddStatusEffect(BaseStats.StatusEffectSource.Turtle, new BaseStats.EBuffFloat(10, fBuffFactor, EquipmentInfo.StatEnum.DEFMultiplier, false));
     }
     if (this.iChargeLevel >= 2)
     {
         this.iSoundCounter--;
         if (this.iSoundCounter <= 0)
         {
             this.xChargeCue = Program.GetTheGame().xSoundSystem.PlayCue("Charge_skill", this.xOwnerView.xEntity.xTransform);
             this.iSoundCounter = 120;
         }
     }
     if (this.xGlowPartial != null)
     {
         this.xGlowPartial.iTimeLeft = 5;
     }
     if (this.xOwnerView != null)
     {
         if (((!Utility.IsWithinRange((int)this.xOwnerView.xEntity.xRenderComponent.iActiveAnimation, 520, 999) && !Utility.IsWithinRange((int)this.xOwnerView.xEntity.xRenderComponent.iActiveAnimation, 240, 243)) || this.xOwnerView.xEntity.xCurrentSpellCharge != this) && this.bLocalOrServer)
         {
             this.iChargeLevel = 0;
             this.iCounter = 0;
             if (this.xOwnerView.xEntity.xCurrentSpellCharge == this)
             {
                 this.Abort();
                 this.Detach();
                 this.xOwnerView.xEntity.xCurrentSpellCharge = null;
                 this.SendClientInstruction(255, new float[0]);
                 this.bDetached = true;
                 return;
             }
         }
         else
         {
             SpellCharge arg_1B6_0 = this.xOwnerView.xEntity.xCurrentSpellCharge;
         }
     }
 }
Пример #4
0
 private void StartBeamSound()
 {
     if (this.xBeamSoundWrapper != null)
     {
         this.xBeamSoundWrapper.Stop();
     }
     this.xBeamSoundWrapper = Program.game.xSoundSystem.PlayCue("Guardian_LaserBeamMid", this.xOwner, false);
 }
Пример #5
0
 public override void OnAnimationCallback(AnimationInstruction xIns)
 {
     if (xIns.xEvent.afAlterableValues[0] == 0f)
     {
         if (this.bNextAttackFromJump && !this.bAttackHasHit)
         {
             this.xOwner.xRenderComponent.SwitchAnimation((ushort)(28 + this.xOwner.xRenderComponent.GetCurrentAnimation().byAnimationDirection), Animation.CancelOptions.RestartIfPlaying);
             this.iMeriGoRoundLogic = 4;
             this.iNextHardUpdate = 20;
             this.StarsBegin();
         }
     }
     else if (xIns.xEvent.afAlterableValues[0] == 2f && Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client)
     {
         Program.GetTheGame()._Enemy_EnterAttackAnimation(this.xOwner, (ushort)(24 + this.xOwner.xRenderComponent.GetCurrentAnimation().byAnimationDirection));
     }
     else if (xIns.xEvent.afAlterableValues[0] == 1f)
     {
         if (this.iMeriGoRoundLogic == 6)
         {
             this.iNextHardUpdate = 70;
             this.iMeriGoRoundLogic = 0;
             this.xOwner.xRenderComponent.SwitchAnimation(38, Animation.CancelOptions.RestartIfPlaying);
             this.StarsEnd();
             if (this.cueDizzy != null && this.cueDizzy.xCue.IsPlaying)
             {
                 this.cueDizzy.xCue.Stop(AudioStopOptions.AsAuthored);
                 this.cueDizzy = Program.GetTheGame().xSoundSystem.PlayCue("Vilya_DizzyShake", this.xOwner, true);
             }
         }
     }
     else if (xIns.xEvent.afAlterableValues[0] == 3f)
     {
         this.cueDizzy = Program.GetTheGame().xSoundSystem.PlayCue("Vilya_Dizzy", this.xOwner, true);
         Program.GetTheGame().xSoundSystem.RegisterAsPausable(this.cueDizzy);
     }
     this.bNextAttackFromJump = false;
 }
Пример #6
0
 public override void OnAnimationCallback(AnimationInstruction xIns)
 {
     if (xIns.xEvent.afAlterableValues[0] == 0f)
     {
         this.xOwner.xCollisionComponent.DeactivateGroup(CollisionComponent.ColliderGroup.All);
         if (this.xDuringPhaseShift != null)
         {
             this.xDuringPhaseShift.Stop();
             this.xDuringPhaseShift = null;
         }
         this.xDuringPhaseShift = Program.game.xSoundSystem.PlayCue("phase_shift_mid", this.xOwner, false);
         return;
     }
     if (xIns.xEvent.afAlterableValues[0] == 1f)
     {
         this.xOwner.xCollisionComponent.ActivateGroup(CollisionComponent.ColliderGroup.All);
         if (this.xDuringPhaseShift != null)
         {
             this.xDuringPhaseShift.Stop();
             this.xDuringPhaseShift = null;
             return;
         }
     }
     else if (xIns.xEvent.afAlterableValues[0] == 2f)
     {
         if (CAS.NetworkRole == NetworkHelperInterface.NetworkRole.Client)
         {
             return;
         }
         if (xIns.xEvent.afAlterableValues[1] == 0f)
         {
             this.xChargeEffect = (Program.game._EffectMaster_AddEffect(new SortedAnimated(this.xOwner.xTransform.v2Pos + new Vector2(3f, 8f), SortedAnimated.SortedAnimatedEffects._EnemyEffects_Boss_PhasemanGreenShotCharge)) as SortedAnimated);
             return;
         }
         if (xIns.xEvent.afAlterableValues[1] == 1f)
         {
             Vector2 v2Dir = new Vector2(0f, 1f);
             List<WorldActor> lxTargetList = Program.game._Enemy_GetTargetList(this, true);
             for (int i = 0; i < lxTargetList.Count; i++)
             {
                 Vector2 v2Try = Vector2.Normalize(lxTargetList[i].xTransform.v2Pos - (this.xOwner.xTransform.v2Pos + new Vector2(5f, 14f)));
                 if (v2Try.X > -0.5f && v2Try.X < 0.5f)
                 {
                     v2Dir = v2Try;
                     break;
                 }
             }
             this.FireYellowBullet(v2Dir, 3.5f, 1f, 80);
             if (this.xChargeEffect != null)
             {
                 this.xChargeEffect.bToBeDestroyed = true;
                 this.xChargeEffect = null;
                 return;
             }
         }
     }
     else
     {
         if (xIns.xEvent.afAlterableValues[0] == 3f)
         {
             this.bReadyToFire = true;
             return;
         }
         if (xIns.xEvent.afAlterableValues[0] == 4f)
         {
             if (this.xDuringPhaseShift != null)
             {
                 this.xDuringPhaseShift.Stop();
                 this.xDuringPhaseShift = null;
             }
             this.xDuringPhaseShift = Program.game.xSoundSystem.PlayCue("phase_shift_mid", this.xOwner, false);
             return;
         }
         if (xIns.xEvent.afAlterableValues[0] == 5f && this.xDuringPhaseShift != null)
         {
             this.xDuringPhaseShift.Stop();
             this.xDuringPhaseShift = null;
         }
     }
 }
Пример #7
0
 public void ProcessInput(LocalInputHelper xGameInput, LocalInputHelper xMenuInput)
 {
     if (xMenuInput.MenuBack.bPressed && !xMenuInput.Action.bPressed)
     {
         this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2008 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
         this.EndFishing(false);
     }
     if (this.iPhase == 3)
     {
         if (xMenuInput.Action.bPressed)
         {
             this.EndFishing(true);
             return;
         }
     }
     else if (this.iPhase == 4)
     {
         if (xMenuInput.Action.bPressed)
         {
             if (!Program.GetTheGame().xGameSessionData.henActiveFlags.Contains(FlagCodex.FlagID._BagTips_CaughtAFish))
             {
                 this.iPhase = 10;
                 if (Program.GetTheGame().xLocalPlayer.xGUIStuff.xBag != null)
                 {
                     Program.GetTheGame().xLocalPlayer.xGUIStuff.xBag.iDisplayTimeLeft = 1;
                 }
                 Program.GetTheGame().xLocalPlayer.xGUIStuff.SetBagOfTricks(CAS.GetLibraryText("NoticesAndTips", "BagTips_FishPressLeftRight"));
                 this.ResetGame();
                 return;
             }
             this.iPhase = 5;
             this.iCounter = 0;
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2020 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             this.ResetGame();
             this.xReelInCue = Program.game.xSoundSystem.PlayTrackableInterfaceCue("Fishing_ReelIn");
             if (Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.LocalOnly)
             {
                 NetOutgoingMessage om = base.CreateMessage();
                 om.Write(2);
                 om.Write((int)this.enCurrentFish);
                 base.SendMessage(om);
                 return;
             }
         }
     }
     else if (this.iPhase == 10)
     {
         if (xMenuInput.Left.bDown || xMenuInput.Right.bDown)
         {
             this.iPhase = 5;
             this.iCounter = 0;
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2020 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             this.xReelInCue = Program.game.xSoundSystem.PlayTrackableInterfaceCue("Fishing_ReelIn");
             if (Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.LocalOnly)
             {
                 NetOutgoingMessage om2 = base.CreateMessage();
                 om2.Write(2);
                 om2.Write((int)this.enCurrentFish);
                 base.SendMessage(om2);
                 return;
             }
         }
     }
     else if (this.iPhase == 5)
     {
         if (xMenuInput.Left.bDown)
         {
             this.iGreenZoneXPos -= 2;
             if (this.iGreenZoneXPos < 0)
             {
                 this.iGreenZoneXPos = 0;
                 return;
             }
         }
         else if (xMenuInput.Right.bDown)
         {
             this.iGreenZoneXPos += 2;
             if (this.iGreenZoneXPos > 139 - this.iGreenZoneWidth)
             {
                 this.iGreenZoneXPos = 139 - this.iGreenZoneWidth;
                 return;
             }
         }
     }
     else if (this.iPhase == 6 && xMenuInput.Action.bPressed)
     {
         this.iPhase = 7;
         this.iCounter = 0;
         this.xFloatEffect.bToBeDestroyed = true;
         this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2008 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
     }
 }
 public override void Update()
 {
     if (this.iLaserState == 1)
     {
         if (this.iLaserCounter == -15)
         {
             Program.game.xSoundSystem.PlayInterfaceCue("FlyingFortress_LaserBarsAppear");
         }
         if (this.iLaserCounter >= 0 && this.iLaserCounter % 5 == 0)
         {
             int iMossa = this.iLaserCounter / 5 * 2;
             if (iMossa + 1 < this.lxLaserFence.Count)
             {
                 (this.lxLaserFence[iMossa].xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
                 (this.lxLaserFence[iMossa + 1].xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
             }
             else
             {
                 this.iLaserState = 0;
                 this.xLaserIdleCue = Program.game.xSoundSystem.PlayTrackableInterfaceCue("FlyingFortress_LaserBarsIdle");
             }
         }
         this.iLaserCounter++;
     }
     if (CAS.NetworkRole == NetworkHelperInterface.NetworkRole.Client)
     {
         return;
     }
     if (this.iSpawnState == 1)
     {
         if (this.iSpawnCounter == 0)
         {
             this.AddSpawnEffect(new Vector2(428f, 384f));
             if (Program.game._Enemy_GetDifficultyModifier() > 1)
             {
                 this.AddSpawnEffect(new Vector2(440f, 400f));
             }
         }
         if (this.iSpawnCounter == 40)
         {
             Enemy mos = Program.game._EntityMaster_AddEnemy(EnemyCodex.EnemyTypes.BrawlerBot, new Vector2(428f, 384f), 1, 0f, false, Enemy.SpawnEffectType.HorizontalFold, new float[0]);
             this.lxSpawnedEnemies.Add(mos);
             if (Program.game._Enemy_GetDifficultyModifier() > 1)
             {
                 mos = Program.game._EntityMaster_AddEnemy(EnemyCodex.EnemyTypes.BrawlerBot, new Vector2(440f, 400f), 1, 0f, false, Enemy.SpawnEffectType.HorizontalFold, new float[0]);
                 this.lxSpawnedEnemies.Add(mos);
             }
         }
         if (this.iSpawnCounter == 60)
         {
             this.AddSpawnEffect(new Vector2(465f, 406f));
             this.AddSpawnEffect(new Vector2(465f, 364f));
             if (Program.game.dixPlayers.Count > 2)
             {
                 this.AddSpawnEffect(new Vector2(470f, 400f));
             }
         }
         if (this.iSpawnCounter == 100)
         {
             Enemy mos2 = Program.game._EntityMaster_AddEnemy(EnemyCodex.EnemyTypes.BrawlerBot, new Vector2(465f, 406f), 1, 0f, false, Enemy.SpawnEffectType.HorizontalFold, new float[0]);
             this.lxSpawnedEnemies.Add(mos2);
             mos2 = Program.game._EntityMaster_AddEnemy(EnemyCodex.EnemyTypes.Guardian, new Vector2(465f, 364f), 1, 0f, false, Enemy.SpawnEffectType.HorizontalFold, new float[0]);
             this.lxSpawnedEnemies.Add(mos2);
             if (Program.game.dixPlayers.Count > 2)
             {
                 mos2 = Program.game._EntityMaster_AddEnemy(EnemyCodex.EnemyTypes.Guardian, new Vector2(470f, 400f), 1, 0f, false, Enemy.SpawnEffectType.HorizontalFold, new float[0]);
                 this.lxSpawnedEnemies.Add(mos2);
             }
             this.iSpawnState = 0;
         }
         this.iSpawnCounter++;
     }
     if (this.iSpawnState != 0 || !this.bInTrap || Program.game.xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.Client)
     {
         return;
     }
     for (int i = 0; i < this.lxSpawnedEnemies.Count; i++)
     {
         if (!this.lxSpawnedEnemies[i].bToBeDestroyed)
         {
             return;
         }
     }
     for (int j = 0; j < this.lxLaserFence.Count; j++)
     {
         (this.lxLaserFence[j].xRenderComponent as AnimatedRenderComponent).SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying);
     }
     this.bInTrap = false;
     if (this.xLaserIdleCue != null)
     {
         this.xLaserIdleCue.Stop();
     }
     this.UnregisterColliders();
     base.SendNetworkInstruction(1, new float[0]);
     Program.game._Trigger_HandleTriggerEvent(FlagCodex.FlagID._MainStory_FlyingTemple_WalkIntoRightBridgeTrap, 1);
 }
Пример #9
0
 private void StopDashSound()
 {
     if (this.xDashSoundWrapper != null)
     {
         this.xDashSoundWrapper.Stop();
         this.xDashSoundWrapper = null;
     }
 }
Пример #10
0
 public override void OnAnimationCallback(AnimationInstruction xIns)
 {
     if (xIns.xEvent.afAlterableValues[0] == 0f)
     {
         this.enCurrentAction = BrawlerBotAI.BrawlerBotAction.Chillin;
         this.iNextHardUpdate = 0;
         this.StopDashSound();
         return;
     }
     if (xIns.xEvent.afAlterableValues[0] == 1f)
     {
         this.enCurrentAction = BrawlerBotAI.BrawlerBotAction.Chillin;
         this.iNextHardUpdate = 0;
         return;
     }
     if (xIns.xEvent.afAlterableValues[0] == 2f)
     {
         if (this.xDashSoundWrapper == null)
         {
             this.xDashSoundWrapper = Program.game.xSoundSystem.PlayCue("BrawlerBot_DashMid", this.xOwner, true);
             return;
         }
     }
     else if (xIns.xEvent.afAlterableValues[0] == 3f)
     {
         this.iSuperSlowDownProgress = 24;
     }
 }
Пример #11
0
 public override void Update()
 {
     this.xPlateRC.Update();
     if (this.iStandCounter > 0)
     {
         int iMos = this.iStandCounter;
         this.iStandCounter -= 2;
         if (!this.bLastStand && iMos > 40 && this.iStandCounter <= 40)
         {
             Program.game.xSoundSystem.PlayCue("PuzzlePlateSpinEnd", this.xPlateRC.xTransform.v2Pos);
         }
     }
     if (this.iStandCounter > 0)
     {
         if (this.xPlateRC.iActiveAnimation == 0)
         {
             this.xPlateRC.SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
             Program.game.xSoundSystem.PlayCue("PuzzlePlateDown", this.xPlateRC.xTransform.v2Pos);
         }
         else if (this.xPlateRC.iActiveAnimation == 2)
         {
             float fSpeedMod = 0.75f;
             if (this.xMidSnurr == null && this.iStandCounter > 10)
             {
                 this.xMidSnurr = Program.game.xSoundSystem.PlayCue("PuzzlePlateSpinMid", this.xPlateRC.xTransform.v2Pos);
             }
             if (this.iStandCounter == 0)
             {
                 Program.game.xSoundSystem.PlayCue("PuzzlePlateSpinStart", this.xPlateRC.xTransform.v2Pos);
             }
             if (Program.game.iTrueFrameUpdates % 80 == 0 && this.iStandCounter > 50)
             {
                 this.xMidSnurr = Program.game.xSoundSystem.PlayCue("PuzzlePlateSpinMid", this.xPlateRC.xTransform.v2Pos);
             }
             if (this.iStandCounter > 120)
             {
                 this.iStandCounter = 120;
             }
             if (this.iStandCounter > 50)
             {
                 fSpeedMod = 0.75f + (float)(this.iStandCounter - 50) / 60f;
             }
             if (fSpeedMod < 0.75f)
             {
                 fSpeedMod = 0.75f;
             }
             this.xPlateRC.fAnimationTimeWarp = fSpeedMod;
             if (this.iStandCounter <= 10)
             {
                 if (this.xPlateRC.GetCurrentAnimation().iRenderedFrame == 0 && !this.bLastStand)
                 {
                     this.xPlateRC.SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying);
                     Program.game.xSoundSystem.PlayCue("PuzzlePlateReleased", this.xPlateRC.xTransform.v2Pos);
                     this.iStandCounter = 0;
                     if (this.xMidSnurr != null)
                     {
                         this.xMidSnurr.Stop();
                         this.xMidSnurr = null;
                     }
                 }
                 else
                 {
                     this.iStandCounter = 9;
                 }
             }
         }
     }
     List<Collider> lxPlayerCols = Program.GetTheGame().xCollisionMaster.dexHitboxColliders[Collider.ColliderLayers.Players];
     this.bLastStand = false;
     for (int i = 0; i < lxPlayerCols.Count; i++)
     {
         if (!Program.GetTheGame().xCollisionMaster.TryCollision(this.colHitbox, lxPlayerCols[i]))
         {
             return;
         }
     }
     this.bLastStand = true;
     if (CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client)
     {
         this.OnTrigger();
     }
     this.iStandCounter += 3;
 }