Ejemplo n.º 1
0
 public void ProcessInput(LocalInputHelper xGameInput, LocalInputHelper xMenuInput)
 {
     if (xMenuInput.Action.bPressed && this.iStage == 4)
     {
         this.iStage = 5;
         this.iCounter = 0;
     }
 }
Ejemplo n.º 2
0
 public void ProcessInput(LocalInputHelper xGameInput, LocalInputHelper xMenuInput)
 {
     if (xMenuInput.MenuButton.bPressed)
     {
         Program.game.xRenderMaster.UnregisterRenderComponenent(this.xRC);
         if (Program.GetTheGame().xStolenInput == this)
         {
             Program.GetTheGame().xStolenInput = null;
         }
     }
     if (xMenuInput.Down.bPressed)
     {
         FlagSet.iCursorPosition++;
         if (FlagSet.iCursorPosition >= this.lenFlags.Count)
         {
             FlagSet.iCursorPosition = 0;
         }
         this.UpdateScrollOffset();
     }
     else if (xMenuInput.Up.bPressed)
     {
         FlagSet.iCursorPosition--;
         if (FlagSet.iCursorPosition < 0)
         {
             FlagSet.iCursorPosition = this.lenFlags.Count - 1;
         }
         this.UpdateScrollOffset();
     }
     if (xMenuInput.KeyPressed(Keys.PageDown))
     {
         FlagSet.iCursorPosition += 10;
         if (FlagSet.iCursorPosition >= this.lenFlags.Count)
         {
             FlagSet.iCursorPosition = this.lenFlags.Count - 1;
         }
         this.UpdateScrollOffset();
     }
     else if (xMenuInput.KeyPressed(Keys.PageUp))
     {
         FlagSet.iCursorPosition -= 10;
         if (FlagSet.iCursorPosition < 0)
         {
             FlagSet.iCursorPosition = 0;
         }
         this.UpdateScrollOffset();
     }
     if (xMenuInput.Action.bPressed)
     {
         FlagCodex.FlagID en = this.lenFlags[FlagSet.iCursorPosition];
         if (!Program.game.xGameSessionData.henActiveFlags.Add(en))
         {
             Program.game.xGameSessionData.henActiveFlags.Remove(en);
         }
     }
 }
Ejemplo n.º 3
0
 public override void Interface(LocalInputHelper xInputMenu)
 {
     SoundSystem xSoundSystem = Program.GetTheGame().xSoundSystem;
     if (this.iAppearCounter > 0)
     {
         this.iAppearCounter++;
         if (this.iAppearCounter == 10)
         {
             this.iAppearCounter = 0;
         }
     }
     else if (this.iAppearCounter < 0)
     {
         this.iAppearCounter--;
         if (this.iAppearCounter == -10)
         {
             this.iAppearCounter = 0;
             this.OnTrueExit();
         }
         return;
     }
     if (xInputMenu.MenuButton.bPressed)
     {
         this.ExitMenu();
         this.master.xSoundSystem.PlayInterfaceCue("Menu_Cancel");
         return;
     }
     if (!this.bInDetails)
     {
         if (xInputMenu.Down.bPressed)
         {
             xSoundSystem.PlayInterfaceCue("Menu_Move");
             this.iListSelection += 5;
             if (this.iListSelection >= this.lxDisplayItems.Count)
             {
                 if (this.iListSelection / 5 == (this.lxDisplayItems.Count - 1) / 5)
                 {
                     this.iListSelection = this.lxDisplayItems.Count - 1;
                 }
                 else
                 {
                     this.iListSelection -= ((this.lxDisplayItems.Count - 1) / 5 + 1) * 5;
                 }
             }
             if (this.iListSelection / 5 - 2 > this.iScrollOffset)
             {
                 this.iScrollOffset = this.iListSelection / 5 - 2;
                 if (this.iScrollOffset < 0)
                 {
                     this.iScrollOffset = 0;
                 }
             }
             else if (this.iListSelection / 5 < this.iScrollOffset)
             {
                 this.iScrollOffset = this.iListSelection / 5;
             }
         }
         if (xInputMenu.Up.bPressed)
         {
             xSoundSystem.PlayInterfaceCue("Menu_Move");
             this.iListSelection -= 5;
             if (this.iListSelection < 0)
             {
                 this.iListSelection += ((this.lxDisplayItems.Count - 1) / 5 + 1) * 5;
                 if (this.iListSelection >= this.lxDisplayItems.Count)
                 {
                     this.iListSelection = this.lxDisplayItems.Count - 1;
                 }
             }
             if (this.iListSelection / 5 - 2 > this.iScrollOffset)
             {
                 this.iScrollOffset = this.iListSelection / 5 - 2;
                 if (this.iScrollOffset < 0)
                 {
                     this.iScrollOffset = 0;
                 }
             }
             else if (this.iListSelection / 5 < this.iScrollOffset)
             {
                 this.iScrollOffset = this.iListSelection / 5;
             }
         }
         if (xInputMenu.Right.bPressed)
         {
             xSoundSystem.PlayInterfaceCue("Menu_Move");
             if (this.iListSelection + 1 >= this.lxDisplayItems.Count)
             {
                 this.iListSelection = (this.lxDisplayItems.Count - 1) / 5 * 5;
             }
             else if (this.iListSelection % 5 < 4)
             {
                 this.iListSelection++;
             }
             else
             {
                 this.iListSelection -= 4;
             }
         }
         if (xInputMenu.Left.bPressed)
         {
             xSoundSystem.PlayInterfaceCue("Menu_Move");
             if (this.iListSelection % 5 > 0)
             {
                 this.iListSelection--;
             }
             else
             {
                 this.iListSelection += 4;
                 if (this.iListSelection + 1 >= this.lxDisplayItems.Count)
                 {
                     this.iListSelection = this.lxDisplayItems.Count - 1;
                 }
             }
         }
         if (xInputMenu.MenuBack.bPressed)
         {
             this.ExitMenu();
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Cancel");
         }
         if (xInputMenu.Action.bPressed)
         {
             this.bInDetails = true;
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Changed");
             return;
         }
     }
     else
     {
         bool bMoved = false;
         if (xInputMenu.Up.bPressed)
         {
             this.iSelectedDialogueOption--;
             bMoved = true;
         }
         else if (xInputMenu.Down.bPressed)
         {
             this.iSelectedDialogueOption++;
             bMoved = true;
         }
         if (bMoved)
         {
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Move");
         }
         if (xInputMenu.MenuBack.bPressed)
         {
             this.bInDetails = false;
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Cancel");
         }
         bool arg_3F5_0 = xInputMenu.Action.bPressed;
     }
 }
Ejemplo n.º 4
0
 public override void Interface(LocalInputHelper xInputMenu)
 {
     if (this.iAppearCounter > 0)
     {
         this.iAppearCounter++;
         if (this.iAppearCounter == 10)
         {
             this.iAppearCounter = 0;
         }
     }
     else if (this.iAppearCounter < 0)
     {
         this.iAppearCounter--;
         if (this.iAppearCounter == -10)
         {
             this.iAppearCounter = 0;
             this.OnTrueExit();
         }
         return;
     }
     if (this.iScoreMosAppear > 0 && this.iScoreMosAppear < 10)
     {
         this.iScoreMosAppear++;
     }
     else if (this.iScoreMosAppear < 0 && this.iScoreMosAppear > -10)
     {
         this.iScoreMosAppear--;
         if (this.iScoreMosAppear == -10)
         {
             this.iScoreMosAppear = 0;
         }
     }
     if (xInputMenu.MenuButton.bPressed)
     {
         this.ExitMenu();
         this.master.xSoundSystem.PlayInterfaceCue("Menu_Cancel");
         return;
     }
     if (!this.bInList)
     {
         if (xInputMenu.Left.bPressed || xInputMenu.Right.bPressed)
         {
             this.iSelectedCategory = (this.iSelectedCategory + 1) % 2;
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Move");
         }
         if (xInputMenu.MenuBack.bPressed)
         {
             this.ExitMenu();
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Cancel");
         }
         if (xInputMenu.Action.bPressed && this.iSelectedCategory == 0)
         {
             this.iScoreMosAppear = 1;
             this.bInList = true;
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Changed");
             this.iListSelection = 0;
             return;
         }
     }
     else
     {
         bool bMoved = false;
         if (xInputMenu.Up.bPressed)
         {
             this.iListSelection--;
             if (this.iListSelection < 0)
             {
                 if (this.iSelectedCategory == 0)
                 {
                     this.iListSelection = ChallengeMenu.lenChallangesAsList.Count - 1;
                 }
                 else
                 {
                     this.iListSelection = ChallengeMenu.lenVersusAsList.Count - 1;
                 }
             }
             bMoved = true;
         }
         else if (xInputMenu.Down.bPressed)
         {
             this.iListSelection++;
             if (this.iSelectedCategory == 0)
             {
                 if (this.iListSelection >= ChallengeMenu.lenChallangesAsList.Count)
                 {
                     this.iListSelection = 0;
                 }
             }
             else if (this.iListSelection >= ChallengeMenu.lenVersusAsList.Count)
             {
                 this.iListSelection = 0;
             }
             bMoved = true;
         }
         if (bMoved)
         {
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Move");
         }
         if (xInputMenu.MenuBack.bPressed)
         {
             this.bInList = false;
             this.master.xSoundSystem.PlayInterfaceCue("Menu_Cancel");
             this.iScoreMosAppear = -1;
         }
         if (xInputMenu.Action.bPressed && this.iSelectedCategory == 0 && this.denbChallengeAvailable[ChallengeMenu.lenChallangesAsList[this.iListSelection]])
         {
             this.StartChallange(ChallengeMenu.lenChallangesAsList[this.iListSelection]);
         }
     }
 }
Ejemplo n.º 5
0
		public virtual void Interface(LocalInputHelper xInputMenu)
		{
		}
Ejemplo n.º 6
0
 public void ProcessInput(LocalInputHelper xGameInput, LocalInputHelper xMenuInput)
 {
     if (this.enPhase == CatchMode.Phase.Minigame)
     {
         if (xMenuInput.Up.bPressed)
         {
             this.xGame.Input(CatchMode.Game.Arrow.ArrowType.Up);
             return;
         }
         if (xMenuInput.Right.bPressed)
         {
             this.xGame.Input(CatchMode.Game.Arrow.ArrowType.Right);
             return;
         }
         if (xMenuInput.Down.bPressed)
         {
             this.xGame.Input(CatchMode.Game.Arrow.ArrowType.Down);
             return;
         }
         if (xMenuInput.Left.bPressed)
         {
             this.xGame.Input(CatchMode.Game.Arrow.ArrowType.Left);
             return;
         }
         if (xMenuInput.Attack.bPressed)
         {
             this.xGame.Input(CatchMode.Game.Arrow.ArrowType.Sword);
             return;
         }
         if (xMenuInput.Shield.bPressed)
         {
             this.xGame.Input(CatchMode.Game.Arrow.ArrowType.Shield);
             return;
         }
     }
     else if (this.enPhase == CatchMode.Phase.VictoryPrompt)
     {
         if (xMenuInput.Right.bPressed || xMenuInput.Left.bPressed)
         {
             this.iCatchChoise = (this.iCatchChoise + 1) % 2;
             Program.GetTheGame().xSoundSystem.PlayInterfaceCue("Menu_Move");
             return;
         }
         if (xMenuInput.Action.bPressed)
         {
             Program.GetTheGame().xSoundSystem.PlayInterfaceCue("Menu_Changed");
             this.CatchChoise();
             this.iTimeSinceWinOrLose = 0;
             this.enPhase = CatchMode.Phase.VictoryPromptClose;
         }
     }
 }
Ejemplo n.º 7
0
 public void ProcessInput(LocalInputHelper xGameInput, LocalInputHelper xMenuInput)
 {
     if (xMenuInput.Attack.bPressed || xMenuInput.Left.bPressed || xMenuInput.Up.bPressed || xMenuInput.Down.bPressed || xMenuInput.Right.bPressed)
     {
         if (CAS.NetworkRole == NetworkHelperInterface.NetworkRole.Client)
         {
             NetOutgoingMessage om = base.CreateMessage();
             om.Write(0);
             base.SendMessage(om);
             return;
         }
         if (this.Shake())
         {
             base.SendNetworkInstruction(new float[]
             {
                 1f
             });
         }
     }
 }
Ejemplo n.º 8
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);
     }
 }
Ejemplo n.º 9
0
 public void ProcessInput(LocalInputHelper xGameInput, LocalInputHelper xMenuInput)
 {
 }
Ejemplo n.º 10
0
 public GameButton(LocalInputHelper.ModifiedKey xModifiedKey, Buttons button)
 {
     this.xModifiedKey = xModifiedKey;
 }