input相关

This commit is contained in:
2025-05-26 00:06:37 +08:00
parent 68b88d57db
commit 763fa5103f
23 changed files with 745 additions and 68 deletions

View File

@@ -1,4 +1,6 @@
using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using FairyGUI;
using NBC;
@@ -9,12 +11,6 @@ using UnityEngine.Video;
namespace NBF
{
public enum ControllerType
{
KeyboardMouse = 0,
GamePad = 1
}
public class App : MonoBehaviour
{
public static App Inst { get; private set; }
@@ -35,6 +31,11 @@ namespace NBF
// new GameObject("GameManager").AddComponent<GameManager>();
}
private void OnDestroy()
{
PermanentCommon.Dispose();
}
void Start()
{
ES3.Init();
@@ -85,9 +86,11 @@ namespace NBF
public void StartGame()
{
PermanentCommon.Init();
InputDef.LoadIcon();
UI.Inst.OpenUI<FishingShopPanel>();
LoadData();
//Fishing.Inst.Go(1);
// Fishing.Inst.Go(1);
}
private void LoadData()
@@ -118,17 +121,15 @@ namespace NBF
public ControllerType controllerType = ControllerType.GamePad;
public void SetMouseCurrsor(bool val)
public void SetMouseCursor(bool val)
{
if (val)
{
// InputManager inputManager = FindObjectOfType<InputManager>();
if (controllerType == ControllerType.KeyboardMouse)
{
Cursor.visible = true;
}
// inputManager.SetCursorPositionToScreenCenter();
Cursor.lockState = CursorLockMode.None;
}
else if (controllerType == ControllerType.KeyboardMouse)