コード例 #1
0
 public override void ActivateEvent(I_Unit _UnitThatWalkedOnTile)
 {
     if (_UnitThatWalkedOnTile is UnitPlayer)
     {
         UnitPlayer player = _UnitThatWalkedOnTile as UnitPlayer;
         m_Player = player.GetComponent <ControllerPlayer>();
         m_Player.SetInputMode(new InputMode_InMenu());
         List <KeyValuePair <string, OnUserInterfaceButtonPressed> > menuElements = new List <KeyValuePair <string, OnUserInterfaceButtonPressed> > {
             new KeyValuePair <string, OnUserInterfaceButtonPressed>("Proceed", GoToNextFloor), new KeyValuePair <string, OnUserInterfaceButtonPressed>("Exit", ExitMenu)
         };
         UserInterface.DisplayMenu(menuElements);
     }
 }
コード例 #2
0
 public override void ActivateEvent(I_Unit _UnitThatWalkedOnTile)
 {
     if (_UnitThatWalkedOnTile is UnitPlayer)
     {
         UnitPlayer player = _UnitThatWalkedOnTile as UnitPlayer;
         m_Player = player.GetComponent <ControllerPlayer>();
         if (Application.isMobilePlatform)
         {
             InputMode_Shake inputMode = new InputMode_Shake();
             inputMode.RegisterActivable(m_Activable);
             m_Player.SetInputMode(inputMode);
         }
         else
         {
             InputMode_ShakeDebug inputMode = new InputMode_ShakeDebug();
             inputMode.RegisterActivable(m_Activable);
             m_Player.SetInputMode(inputMode);
         }
     }
 }