示例#1
0
 private static void GetWorldTriggerButton(ref UInt32 currentInput)
 {
     if (FF9StateSystem.AndroidPlatform && PersistenSingleton <EventEngine> .Instance.gMode == 3 && EventInput.IsKeyboardOrJoystickInput)
     {
         currentInput &= ~EventInput.OperationMask;
         UInt32 num = 0u;
         if (PersistenSingleton <AndroidEventInputManager> .Instance.GetKeyTrigger(Control.Menu))
         {
             num |= 16781312u;
             EventInput.InputLog("Press /_\\");
         }
         if (PersistenSingleton <AndroidEventInputManager> .Instance.GetKeyTrigger(Control.Confirm))
         {
             num |= (8192u | EventInput.Lcircle);
             EventInput.InputLog("Press 0");
         }
         if (PersistenSingleton <AndroidEventInputManager> .Instance.GetKeyTrigger(Control.Cancel))
         {
             num |= (16384u | EventInput.Lx);
             EventInput.InputLog("Press X");
         }
         if (PersistenSingleton <AndroidEventInputManager> .Instance.GetKeyTrigger(Control.Special))
         {
             num |= 557056u;
             EventInput.InputLog("Press []");
         }
         currentInput |= num;
     }
 }
示例#2
0
 public static void RecieveDialogConfirm()
 {
     if (FF9StateSystem.PCPlatform && !Singleton <DialogManager> .Instance.IsDialogNeedControl() && !Singleton <BubbleUI> .Instance.IsActive && (PersistenSingleton <EventEngine> .Instance.gMode == 1 || PersistenSingleton <EventEngine> .Instance.gMode == 3) && EventHUD.CurrentHUD == MinigameHUD.None)
     {
         EventInput.isDialogConfirm = true;
         EventInput.InputLog("Press O from mouse");
     }
 }
示例#3
0
    private static UInt32 ProcessInput(Boolean isTriggerDirection, Boolean isTriggerButton)
    {
        UInt32  num    = 0u;
        Vector2 vector = Vector2.zero;

        if (VirtualAnalog.HasInput())
        {
            vector = VirtualAnalog.GetAnalogValue();
            if (Mathf.Abs(vector.x) >= 0.1f || Mathf.Abs(vector.y) >= 0.1f)
            {
                if (vector.y > 0f)
                {
                    num |= 16u;
                }
                if (vector.y < 0f)
                {
                    num |= 64u;
                }
                if (vector.x < 0f)
                {
                    num |= 128u;
                }
                if (vector.x > 0f)
                {
                    num |= 32u;
                }
            }
        }
        if (EventInput.GetKey(Control.Menu, isTriggerButton))
        {
            num |= 16781312u;
            EventInput.InputLog("Press /_\\");
        }
        if (EventInput.GetKey(Control.Confirm, isTriggerButton))
        {
            num |= (8192u | EventInput.Lcircle);
            EventInput.InputLog("Press 0");
        }
        if (EventInput.GetKey(Control.Cancel, isTriggerButton))
        {
            num |= (16384u | EventInput.Lx);
            EventInput.InputLog("Press X");
        }
        if (EventInput.GetKey(Control.Special, isTriggerButton))
        {
            num |= 557056u;
            EventInput.InputLog("Press []");
        }
        if (EventInput.GetKey(Control.Select, isTriggerButton))
        {
            num |= 1u;
            EventInput.InputLog("Press Select");
        }
        if (EventInput.GetKey(Control.Pause, isTriggerButton))
        {
            num |= 8u;
            EventInput.InputLog("Press Start");
        }
        if (EventInput.GetKey(Control.LeftBumper, isTriggerButton))
        {
            num |= 1049600u;
            EventInput.InputLog("Press L1");
        }
        if (EventInput.GetKey(Control.RightBumper, isTriggerButton))
        {
            num |= 2099200u;
            EventInput.InputLog("Press R1");
        }
        if (EventInput.GetKey(Control.LeftTrigger, isTriggerButton))
        {
            num |= 4194560u;
            EventInput.InputLog("Press L2");
        }
        if (EventInput.GetKey(Control.RightTrigger, isTriggerButton))
        {
            num |= 8389120u;
            EventInput.InputLog("Press R2");
        }
        if (EventInput.GetKey(Control.Up, isTriggerDirection))
        {
            num |= 16u;
            EventInput.InputLog("Press ^");
        }
        if (EventInput.GetKey(Control.Down, isTriggerDirection))
        {
            num |= 64u;
            EventInput.InputLog("Press v");
        }
        if (EventInput.GetKey(Control.Left, isTriggerDirection))
        {
            num |= 128u;
            EventInput.InputLog("Press <");
        }
        if (EventInput.GetKey(Control.Right, isTriggerDirection))
        {
            num |= 32u;
            EventInput.InputLog("Press >");
        }
        return(num);
    }
示例#4
0
    public static UInt32 ReadInput()
    {
        UInt32 num = 0u;

        if (!EventInput.isProcessingInput)
        {
            EventInput.ResetWorldTriggerButton();
            return(num);
        }
        Int32   fldMapNo = (Int32)FF9StateSystem.Common.FF9.fldMapNo;
        Int32   gMode    = PersistenSingleton <EventEngine> .Instance.gMode;
        Boolean isKeyboardOrJoystickInput = EventInput.IsKeyboardOrJoystickInput;

        if (Singleton <BubbleUI> .Instance.IsActive)
        {
            if (gMode == 1)
            {
                if (fldMapNo == 1420 && EventInput.CheckLadderFlag())
                {
                    num = EventInput.ProcessInput(false, false);
                }
                else
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
            else if (gMode == 3)
            {
                if (FF9StateSystem.MobilePlatform)
                {
                    num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput);
                    EventInput.GetWorldTriggerButton(ref num);
                }
                else
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
        }
        else if (EventHUD.CurrentHUD != MinigameHUD.None)
        {
            MinigameHUD currentHUD = EventHUD.CurrentHUD;
            if (currentHUD != MinigameHUD.Chanbara)
            {
                if (currentHUD != MinigameHUD.RacingHippaul)
                {
                    num = EventInput.ProcessInput(false, true);
                }
                else
                {
                    num = EventInput.ProcessInput(false, false);
                }
            }
            else
            {
                num  = EventInput.ProcessInput(true, true);
                num &= EventInput.ChanbaraMask;
                if (FF9StateSystem.MobilePlatform)
                {
                    if ((num & 8u) > 0u)
                    {
                        EventInput.IsNeedAddStartSignal = true;
                    }
                    else if (EventInput.addStartSignal > 0)
                    {
                        num |= 8u;
                        EventInput.addStartSignal--;
                        EventInput.InputLog("Extra Start");
                    }
                }
            }
        }
        else if (fldMapNo == 606)
        {
            if (EventHUD.CurrentHUD == MinigameHUD.Telescope)
            {
                num = EventInput.ProcessInput(false, true);
            }
        }
        else if (fldMapNo == 2204 && TimerUI.Enable)
        {
            num = EventInput.ProcessInput(false, false);
        }
        else if (fldMapNo == 1607)
        {
            num = EventInput.ProcessInput(false, false);
        }
        else if (fldMapNo == 1420)
        {
            num = EventInput.ProcessInput(false, true);
        }
        else if (fldMapNo == 1422)
        {
            num = EventInput.ProcessInput(false, true);
        }
        else
        {
            Dialog mognetDialog = Singleton <DialogManager> .Instance.GetMognetDialog();

            if (mognetDialog != (UnityEngine.Object)null)
            {
                if (mognetDialog.IsChoiceReady)
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
            else if (FF9StateSystem.MobilePlatform)
            {
                num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput);
                if (isKeyboardOrJoystickInput)
                {
                    UIManager.Input.ResetTriggerEvent();
                }
                EventInput.GetWorldTriggerButton(ref num);
            }
            else
            {
                num = EventInput.ProcessInput(false, true);
            }
        }
        num |= EventInput.eventButtonInput;
        if (EventInput.isDialogConfirm)
        {
            num |= EventInput.ConfirmMask;
            EventInput.isDialogConfirm = false;
        }
        if (HonoBehaviorSystem.Instance.IsFastForwardModeActive())
        {
            if (FF9StateSystem.MobilePlatform)
            {
                if (fldMapNo == 909 || fldMapNo == 1909)
                {
                    num = EventInput.FastForwardProcess(gMode, fldMapNo, num);
                }
            }
            else
            {
                num = EventInput.FastForwardProcess(gMode, fldMapNo, num);
            }
        }
        num &= ~EventInput.PSXCntlPadMask[0];
        if (FF9StateSystem.MobilePlatform && gMode == 3 && EventCollision.IsRidingChocobo())
        {
            if ((num & 524288u) > 0u || (num & 32768u) > 0u)
            {
                EventInput.isPressedDig = true;
            }
            else if ((num & 16777216u) > 0u || (num & 4096u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
            else if ((num & EventInput.Lx) > 0u || (num & 16384u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
            else if ((num & 1u) > 0u || (num & 1u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
        }
        if (gMode == 3 && EventEngineUtils.IsMogCalled(PersistenSingleton <EventEngine> .Instance))
        {
            ff9.w_isMogActive = true;
        }
        if (gMode == 3 && EMinigame.CheckBeachMinigame() && EventCollision.IsWorldTrigger() && (num & CancelMask) > 0u)
        {
            num &= ~CancelMask;
            EventInput.InputLog("Remove cancel mask for <SQEX> #2893");
        }
        EventInput.eventButtonInput = 0u;
        EventInput.ResetWorldTriggerButton();
        return(num);
    }