예제 #1
0
 public override void OnInstruction(byte byInstructionID, params float[] afParams)
 {
     if (byInstructionID == 0)
     {
         this.iLaserState = 1;
         this.xTrig.bToBeDestroyed = true;
         return;
     }
     if (byInstructionID == 1)
     {
         return;
     }
     if (byInstructionID == 2)
     {
         this.iState = 1;
         this.iCounter = 0;
         this.xColorOverlayWhite.fAlpha = 0.8f;
         return;
     }
     if (byInstructionID == 3)
     {
         this.iState = 2;
         this.iCounter = 0;
         return;
     }
     if (byInstructionID == 4)
     {
         this.iBlackState = 1;
         return;
     }
     if (byInstructionID == 5)
     {
         this.iState = 3;
         return;
     }
     if (byInstructionID == 6)
     {
         this.iState = 4;
         this.iTextCounter = 0;
         return;
     }
     if (byInstructionID == 10)
     {
         this.iLaserState = -1;
         this.iLaserCounter = 0;
         return;
     }
     if (byInstructionID == 11)
     {
         this.iState = 10;
         this.iCounter = 0;
         return;
     }
     if (byInstructionID == 12)
     {
         this.xHead.xOwner.bUpdateInCutscene = true;
         if (this.xHead.iCounter > 21)
         {
             this.xHead.iCounter = 20;
             return;
         }
     }
     else
     {
         if (byInstructionID == 13)
         {
             this.iState = 11;
             this.iCounter = 0;
             this.iBlackState = 1;
             Program.game.xRenderMaster.UnregisterRenderComponenent(this.xHead.xEndAmulet.xRenderComponent);
             Program.game.xRenderMaster.RegisterGUIRenderComponent(this.xHead.xEndAmulet.xRenderComponent);
             return;
         }
         if (byInstructionID == 14)
         {
             this.xHead.xEndAmulet.bToBeDestroyed = true;
             this.iState = 12;
             this.iCounter = 0;
             this.iBlackState = -1;
             return;
         }
         if (byInstructionID == 100)
         {
             this.xLeftHand.xOwner.xCollisionComponent.ActivateGroup(CollisionComponent.ColliderGroup.All);
             this.xRightHand.xOwner.xCollisionComponent.ActivateGroup(CollisionComponent.ColliderGroup.All);
             this.xLeftHand.xOwner.xBaseStats.bUntargetable = false;
             this.xRightHand.xOwner.xBaseStats.bUntargetable = false;
             return;
         }
         if (byInstructionID == 101)
         {
             Program.game.xSoundSystem.PlayInterfaceCue("Gund4m_Startup_Short");
             this.xLeftHand.xOwner.xTransform.v2Pos = this.xLeftHand.v2StartPos;
             this.xRightHand.xOwner.xTransform.v2Pos = this.xRightHand.v2StartPos;
             if (this.xHead.xBody.xRenderComponent.AsAnimated().iActiveAnimation == 12)
             {
                 this.xHead.xBody.xRenderComponent.AsAnimated().SwitchAnimation(13, Animation.CancelOptions.IgnoreIfPlaying);
                 this.iLerpColorCounter = 30;
             }
             else
             {
                 this.xLeftHand.xOwner.xRenderComponent.cColor = Color.White;
                 this.xRightHand.xOwner.xRenderComponent.cColor = Color.White;
             }
             this.xLeftHand.xOwner.xRenderComponent.fVirtualHeight = 0f;
             this.xRightHand.xOwner.xRenderComponent.fVirtualHeight = 0f;
             this.xHead.xRightScreen.xRenderComponent.AsAnimated().SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
             this.xHead.xLeftScreen.xRenderComponent.AsAnimated().SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
             this.xHead.xMidScreen.xRenderComponent.AsAnimated().SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
             this.iBlackState = 0;
             if (this.xColorOverlayBlack != null)
             {
                 this.xColorOverlayBlack.fAlpha = 0f;
             }
             if (this.xColorOverlayWhite != null)
             {
                 this.xColorOverlayWhite.fAlpha = 0f;
             }
             if (this.xNiceOverlay != null)
             {
                 this.xNiceOverlay.fAlpha = 0f;
                 Program.game.xRenderMaster.UnregisterRenderComponenent(this.xNiceOverlay);
             }
             Program.game.xRenderMaster.UnregisterRenderComponenent(this.xRenderFunction);
             this.iState = 1000;
             return;
         }
         if (byInstructionID == 102)
         {
             this.iBlackState = -1;
             this.iState = 15;
             this.iCounter = 0;
             if (this.xHead.xEndAmulet != null)
             {
                 this.xHead.xEndAmulet.bToBeDestroyed = true;
             }
             this.xHead.xBody.xRenderComponent.AsAnimated().SwitchAnimation(11, Animation.CancelOptions.IgnoreIfPlaying);
             this.xHead.xLeftScreen.xRenderComponent.AsAnimated().SwitchAnimation(9, Animation.CancelOptions.IgnoreIfPlaying);
             this.xHead.xRightScreen.xRenderComponent.AsAnimated().SwitchAnimation(9, Animation.CancelOptions.IgnoreIfPlaying);
             this.xHead.xMidScreen.xRenderComponent.AsAnimated().SwitchAnimation(9, Animation.CancelOptions.IgnoreIfPlaying);
             Program.game.xRenderMaster.UnregisterRenderComponenent(this.xHead.xScreenCountDown);
             this.xHead.xOwner.xRenderComponent.SwitchAnimation(17, Animation.CancelOptions.IgnoreIfPlaying);
             this.xHead.xOwner.xRenderComponent.fPassedTicks = 10000f;
             return;
         }
         if (byInstructionID == 103)
         {
             Program.game.xCollisionMaster.RegisterStaticCollider(new BoxCollider(new Rectangle(270, 278, 101, 48)));
             this.xHead.xOwner.bDefeated = true;
             GroundFlagTrigger xTrig = new GroundFlagTrigger(FlagCodex.FlagID._Roguelike_ActivateGundamAlternateZoning, new BoxCollider(new Rectangle(165, 403, 31, 6)), new List<Collider>(), true);
             xTrig.bCheckVsPlayers = true;
             xTrig.bGatherFriends = true;
             Program.game.xLevelMaster.lxSceneTriggers.Add(xTrig);
             return;
         }
         if (byInstructionID == 104)
         {
             this.xHead.bActive = true;
             this.xLeftHand.bActive = true;
             this.xRightHand.bActive = true;
         }
     }
 }
예제 #2
0
 public override void OnUpdate()
 {
     this.iCounter++;
     this.iNextHardUpdate--;
     if (Program.game.xLevelMaster.xCurrentLevel.enZone == Level.ZoneEnum.EvergrindCity_Main)
     {
         if (this.iCycleProgress == 0)
         {
             if (this.iPartialProgress == 0)
             {
                 if (this.SomeOneClose())
                 {
                     this.Caught();
                 }
             }
             else if (this.iPartialProgress == 1)
             {
                 if (this.xOwner.xRenderComponent.GetCurrentAnimation().bAtEnd)
                 {
                     this.iPartialProgress = 2;
                     this.iCounter = 0;
                 }
             }
             else if (this.iPartialProgress == 2)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(13);
                 TransformComponent expr_C1_cp_0 = this.xOwner.xTransform;
                 expr_C1_cp_0.v2Pos.X = expr_C1_cp_0.v2Pos.X - 3f;
                 if (this.xOwner.xTransform.v2Pos.X < 132f)
                 {
                     this.iPartialProgress = 3;
                 }
             }
             else if (this.iPartialProgress == 3)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_12B_cp_0 = this.xOwner.xTransform;
                 expr_12B_cp_0.v2Pos.Y = expr_12B_cp_0.v2Pos.Y + 3f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 476f)
                 {
                     this.iPartialProgress = 0;
                     this.iCycleProgress = 1;
                     this.Stop();
                 }
             }
         }
         else if (this.iCycleProgress == 1)
         {
             if (this.iPartialProgress == 0)
             {
                 if (this.SomeOneClose())
                 {
                     this.Caught();
                 }
             }
             else if (this.iPartialProgress == 1)
             {
                 if (this.xOwner.xRenderComponent.GetCurrentAnimation().bAtEnd)
                 {
                     this.iPartialProgress = 2;
                     this.iCounter = 0;
                 }
             }
             else if (this.iPartialProgress == 2)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(11);
                 TransformComponent expr_1FF_cp_0 = this.xOwner.xTransform;
                 expr_1FF_cp_0.v2Pos.X = expr_1FF_cp_0.v2Pos.X + 3f;
                 if (this.xOwner.xTransform.v2Pos.X >= 1245f)
                 {
                     this.iPartialProgress = 3;
                 }
             }
             else if (this.iPartialProgress == 3)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_269_cp_0 = this.xOwner.xTransform;
                 expr_269_cp_0.v2Pos.Y = expr_269_cp_0.v2Pos.Y + 3f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 668f)
                 {
                     this.iPartialProgress = 0;
                     this.iCycleProgress = 2;
                     this.Stop();
                 }
             }
         }
         else if (this.iCycleProgress == 2)
         {
             if (this.iPartialProgress == 0)
             {
                 if (this.SomeOneClose())
                 {
                     this.Caught();
                 }
             }
             else if (this.iPartialProgress == 1)
             {
                 if (this.xOwner.xRenderComponent.GetCurrentAnimation().bAtEnd)
                 {
                     this.iPartialProgress = 2;
                     this.iCounter = 0;
                 }
             }
             else if (this.iPartialProgress == 2)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(13);
                 TransformComponent expr_33D_cp_0 = this.xOwner.xTransform;
                 expr_33D_cp_0.v2Pos.X = expr_33D_cp_0.v2Pos.X - 3f;
                 if (this.xOwner.xTransform.v2Pos.X <= 785f)
                 {
                     this.iPartialProgress = 3;
                 }
             }
             else if (this.iPartialProgress == 3)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_3A7_cp_0 = this.xOwner.xTransform;
                 expr_3A7_cp_0.v2Pos.Y = expr_3A7_cp_0.v2Pos.Y + 3f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 908f)
                 {
                     this.iPartialProgress = 0;
                     this.iCycleProgress = 3;
                     this.Stop();
                 }
             }
         }
         else if (this.iCycleProgress == 3)
         {
             if (this.iPartialProgress == 0)
             {
                 if (this.SomeOneClose())
                 {
                     this.Caught();
                 }
             }
             else if (this.iPartialProgress == 1)
             {
                 if (this.xOwner.xRenderComponent.GetCurrentAnimation().bAtEnd)
                 {
                     this.iPartialProgress = 2;
                     this.iCounter = 0;
                 }
             }
             else if (this.iPartialProgress == 2)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_47B_cp_0 = this.xOwner.xTransform;
                 expr_47B_cp_0.v2Pos.Y = expr_47B_cp_0.v2Pos.Y + 3f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 1022f)
                 {
                     this.FadeOut();
                     base.SendClientInstruction(1, new float[0]);
                     this.iPartialProgress = 3;
                     Program.game._Trigger_HandleTriggerEvent(FlagCodex.FlagID._MainStory_PostFlyingTemple_MarinoChase, 0);
                 }
             }
             else if (this.iPartialProgress == 3)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_506_cp_0 = this.xOwner.xTransform;
                 expr_506_cp_0.v2Pos.Y = expr_506_cp_0.v2Pos.Y + 3f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 1050f)
                 {
                     this.iPartialProgress = 10;
                     this.iCycleProgress = 10;
                     this.Stop();
                 }
             }
         }
     }
     else if (Program.game.xLevelMaster.xCurrentLevel.enZone == Level.ZoneEnum.EvergrindFields_South)
     {
         if (this.iCycleProgress == 0)
         {
             if (this.iPartialProgress == 0)
             {
                 if (this.SomeOneClose())
                 {
                     this.Caught();
                 }
             }
             else if (this.iPartialProgress == 1)
             {
                 if (this.xOwner.xRenderComponent.GetCurrentAnimation().bAtEnd)
                 {
                     this.iPartialProgress = 2;
                     this.iCounter = 0;
                 }
             }
             else if (this.iPartialProgress == 2)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_5F6_cp_0 = this.xOwner.xTransform;
                 expr_5F6_cp_0.v2Pos.Y = expr_5F6_cp_0.v2Pos.Y + 3f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 336f)
                 {
                     this.iPartialProgress = 3;
                 }
             }
             else if (this.iPartialProgress == 3)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_65D_cp_0 = this.xOwner.xTransform;
                 expr_65D_cp_0.v2Pos.Y = expr_65D_cp_0.v2Pos.Y + 2.5f;
                 TransformComponent expr_67E_cp_0 = this.xOwner.xTransform;
                 expr_67E_cp_0.v2Pos.X = expr_67E_cp_0.v2Pos.X - 2.5f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 454f)
                 {
                     this.iPartialProgress = 4;
                 }
             }
             else if (this.iPartialProgress == 4)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_6E5_cp_0 = this.xOwner.xTransform;
                 expr_6E5_cp_0.v2Pos.Y = expr_6E5_cp_0.v2Pos.Y + 3f;
                 if (this.xOwner.xTransform.v2Pos.Y >= 644f)
                 {
                     this.iPartialProgress = 5;
                 }
             }
             else if (this.iPartialProgress == 5)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(12);
                 TransformComponent expr_74C_cp_0 = this.xOwner.xTransform;
                 expr_74C_cp_0.v2Pos.Y = expr_74C_cp_0.v2Pos.Y + 2.5f;
                 TransformComponent expr_76D_cp_0 = this.xOwner.xTransform;
                 expr_76D_cp_0.v2Pos.X = expr_76D_cp_0.v2Pos.X + 2.5f;
                 if (this.xOwner.xTransform.v2Pos.X >= 756f)
                 {
                     this.iPartialProgress = 6;
                 }
             }
             else if (this.iPartialProgress == 6)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(11);
                 TransformComponent expr_7D7_cp_0 = this.xOwner.xTransform;
                 expr_7D7_cp_0.v2Pos.X = expr_7D7_cp_0.v2Pos.X + 3f;
                 if (this.xOwner.xTransform.v2Pos.X >= 1022f)
                 {
                     this.iCycleProgress = 1;
                     this.Stop();
                 }
             }
         }
         else if (this.iCycleProgress == 1)
         {
             if (this.iPartialProgress == 0)
             {
                 if (this.SomeOneClose())
                 {
                     this.Caught();
                 }
             }
             else if (this.iPartialProgress == 1)
             {
                 if (this.xOwner.xRenderComponent.GetCurrentAnimation().bAtEnd)
                 {
                     this.iPartialProgress = 2;
                     this.iCounter = 0;
                 }
             }
             else if (this.iPartialProgress == 2)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(10);
                 TransformComponent expr_8A4_cp_0 = this.xOwner.xTransform;
                 expr_8A4_cp_0.v2Pos.Y = expr_8A4_cp_0.v2Pos.Y - 3f;
                 if (this.xOwner.xTransform.v2Pos.Y <= 635f)
                 {
                     this.iPartialProgress = 3;
                     this.OpenGate();
                 }
             }
             else if (this.iPartialProgress == 3)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(10);
                 TransformComponent expr_914_cp_0 = this.xOwner.xTransform;
                 expr_914_cp_0.v2Pos.Y = expr_914_cp_0.v2Pos.Y - 3f;
                 if (this.xOwner.xTransform.v2Pos.Y <= 500f)
                 {
                     this.iPartialProgress = 4;
                     GroundFlagTrigger xMos = new GroundFlagTrigger(FlagCodex.FlagID._MainStory_PostFlyingTemple_MarinoChase, 5, new BoxCollider(new Rectangle(854, 392, 338, 198)), new List<Collider>(), false);
                     xMos.bCheckVsPlayers = true;
                     xMos.bDisableOnTrigger = true;
                     xMos.colHitbox.ibitLayers = Utility.CreateIntMask(new int[]
                     {
                         2
                     });
                     Program.game.xLevelMaster.lxSceneTriggers.Add(xMos);
                     Program.game._Trigger_HandleTriggerEvent(FlagCodex.FlagID._MainStory_PostFlyingTemple_MarinoChase, 3);
                 }
             }
             else if (this.iPartialProgress == 4)
             {
                 this.xOwner.xRenderComponent.SwitchAnimation(2);
             }
         }
     }
     this.xOwner.xTransform.v2ServerPos = this.xOwner.xTransform.v2Pos;
 }