コード例 #1
0
    public static SearchlightActions BindKeyboardAndJoystick()
    {
        SearchlightActions searchlightActions = new SearchlightActions();

        searchlightActions.Searchlight_Switch.AddDefaultBinding(InputControlType.RightBumper);
        searchlightActions.Searchlight_Switch.AddDefaultBinding(Key.Tab);

        searchlightActions.Searchlight_Lock.AddDefaultBinding(InputControlType.LeftBumper);
        searchlightActions.Searchlight_Lock.AddDefaultBinding(Key.L);

        searchlightActions.Searchlight_Upgrade.AddDefaultBinding(InputControlType.RightTrigger);
        searchlightActions.Searchlight_Upgrade.AddDefaultBinding(Key.U);

        return searchlightActions;
    }
コード例 #2
0
 void Awake()
 {
     input = SearchlightActions.BindKeyboardAndJoystick();
     Messenger.AddListener(GameEvent.BATTERY_DEPLETED, OnBatteryDepleted);
     Messenger.AddListener(GameEvent.SEARCHLIGHT_LIGHTCHANGED, OnLightChanged);
 }