add some extra assets FX and SFX
This commit is contained in:
@@ -67,6 +67,8 @@ public class playerInputManager : MonoBehaviour
|
||||
public bool usingTouchControls;
|
||||
public bool gameManagerPaused;
|
||||
|
||||
public bool useNewInputSystem;
|
||||
|
||||
public string horizontalString = "Horizontal";
|
||||
public string verticalString = "Vertical";
|
||||
public string mouseXString = "Mouse X";
|
||||
@@ -175,6 +177,9 @@ public class playerInputManager : MonoBehaviour
|
||||
|
||||
public List<touchButtonsInfo> touchButtonsInfoList = new List<touchButtonsInfo> ();
|
||||
|
||||
|
||||
string [] keyNumberListString = new string [] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
|
||||
#if REWIRED
|
||||
private bool _useRewired;
|
||||
private IList<Player> _rewiredPlayers;
|
||||
@@ -283,6 +288,8 @@ public class playerInputManager : MonoBehaviour
|
||||
|
||||
usingGamepad = input.isUsingGamepad ();
|
||||
|
||||
useNewInputSystem = input.isUseNewInputSystemActive ();
|
||||
|
||||
if (usingKeyBoard || allowKeyboardAndGamepad || useOnlyKeyboard) {
|
||||
if (!usingTouchControls || (allowGamepadInTouchDevice && usingGamepad)) {
|
||||
|
||||
@@ -299,14 +306,24 @@ public class playerInputManager : MonoBehaviour
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
movementAxis.x = Input.GetAxis (horizontalString);
|
||||
movementAxis.y = Input.GetAxis (verticalString);
|
||||
|
||||
mouseAxis.x = Input.GetAxis (mouseXString);
|
||||
mouseAxis.y = Input.GetAxis (mouseYString);
|
||||
if (useNewInputSystem) {
|
||||
movementAxis = input.getKeyboardAxisInputValue ();
|
||||
|
||||
mouseAxis = input.getMouseAxisInputValue ();
|
||||
|
||||
rawMovementAxis = input.getKeyboardRawAxisInputValue ();
|
||||
} else {
|
||||
movementAxis.x = Input.GetAxis (horizontalString);
|
||||
movementAxis.y = Input.GetAxis (verticalString);
|
||||
|
||||
mouseAxis.x = Input.GetAxis (mouseXString);
|
||||
mouseAxis.y = Input.GetAxis (mouseYString);
|
||||
|
||||
rawMovementAxis.x = Input.GetAxisRaw (horizontalString);
|
||||
rawMovementAxis.y = Input.GetAxisRaw (verticalString);
|
||||
}
|
||||
|
||||
rawMovementAxis.x = Input.GetAxisRaw (horizontalString);
|
||||
rawMovementAxis.y = Input.GetAxisRaw (verticalString);
|
||||
#if REWIRED
|
||||
}
|
||||
#endif
|
||||
@@ -781,8 +798,11 @@ public class playerInputManager : MonoBehaviour
|
||||
if (_useRewired)
|
||||
return new Vector2 (_rewiredPlayers[playerID - 1].GetAxis (horizontalString), _rewiredPlayers[playerID - 1].GetAxis (verticalString));
|
||||
#endif
|
||||
|
||||
return new Vector2 (Input.GetAxis (horizontalString), Input.GetAxis (verticalString));
|
||||
if (useNewInputSystem) {
|
||||
return input.getKeyboardAxisInputValue ();
|
||||
} else {
|
||||
return new Vector2 (Input.GetAxis (horizontalString), Input.GetAxis (verticalString));
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 getRealMouseAxisInput ()
|
||||
@@ -791,8 +811,11 @@ public class playerInputManager : MonoBehaviour
|
||||
if (_useRewired)
|
||||
return new Vector2 (_rewiredPlayers[playerID - 1].GetAxis (mouseXString), _rewiredPlayers[playerID - 1].GetAxis (mouseYString));
|
||||
#endif
|
||||
|
||||
return new Vector2 (Input.GetAxis (mouseXString), Input.GetAxis (mouseYString));
|
||||
if (useNewInputSystem) {
|
||||
return input.getMouseAxisInputValue ();
|
||||
} else {
|
||||
return new Vector2 (Input.GetAxis (mouseXString), Input.GetAxis (mouseYString));
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 getRealMouseRawAxisInput ()
|
||||
@@ -801,8 +824,11 @@ public class playerInputManager : MonoBehaviour
|
||||
if (_useRewired)
|
||||
return new Vector2 (_rewiredPlayers[playerID - 1].GetAxisRaw (mouseXString), _rewiredPlayers[playerID - 1].GetAxisRaw (mouseYString));
|
||||
#endif
|
||||
|
||||
return new Vector2 (Input.GetAxisRaw (mouseXString), Input.GetAxisRaw (mouseYString));
|
||||
if (useNewInputSystem) {
|
||||
return input.getKeyboardRawAxisInputValue ();
|
||||
} else {
|
||||
return new Vector2 (Input.GetAxisRaw (mouseXString), Input.GetAxisRaw (mouseYString));
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 getRealMouseGamepadAxisInput ()
|
||||
@@ -922,7 +948,26 @@ public class playerInputManager : MonoBehaviour
|
||||
return input.checkPlayerInputButtonFromMultiAxesList (multiAxesStringIndex, axesStringIndex, buttonType, playerID, false, useOnlyKeyboard);
|
||||
}
|
||||
|
||||
string [] keyNumberListString = new string [] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
public bool checkIfInputPressedByName (string inputName, inputManager.buttonType buttonType)
|
||||
{
|
||||
int axesStringIndex = -1;
|
||||
|
||||
for (int i = 0; i < currentMultiAxesCount; i++) {
|
||||
|
||||
currentMultiAxes = multiAxesList [i];
|
||||
|
||||
axesStringIndex = currentMultiAxes.axes.FindIndex (s => s.actionName.Equals (inputName));
|
||||
|
||||
if (axesStringIndex != -1) {
|
||||
return input.checkPlayerInputButtonFromMultiAxesList (
|
||||
currentMultiAxes.multiAxesStringIndex,
|
||||
currentMultiAxes.axes [axesStringIndex].axesStringIndex,
|
||||
buttonType, playerID, false, useOnlyKeyboard);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int checkNumberInput (int numberAmount)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user