mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
aim button works
This commit is contained in:
parent
4045311d59
commit
0afbaa9d4e
3 changed files with 20 additions and 5 deletions
|
@ -288,7 +288,8 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
// ignore mouse buttons when touch is enabled
|
||||
CustomInput.Instance.SetButton("LeftClick", false);
|
||||
CustomInput.Instance.SetButton("RightClick", false);
|
||||
if (!CustomInput.Instance.HasButton("RightClick"))
|
||||
CustomInput.Instance.SetButton("RightClick", false);
|
||||
CustomInput.Instance.SetButtonDown("LeftClick", false);
|
||||
CustomInput.Instance.SetButtonDown("RightClick", false);
|
||||
|
||||
|
@ -315,9 +316,9 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
// preserve input for: walk, sprint, aim
|
||||
|
||||
bool isWalkOn = customInput.GetButton("Walk");
|
||||
bool isSprintOn = customInput.GetButton("Sprint");
|
||||
bool isAimOn = customInput.GetButton("RightClick");
|
||||
bool isWalkOn = customInput.GetButtonNoDefaultInput("Walk");
|
||||
bool isSprintOn = customInput.GetButtonNoDefaultInput("Sprint");
|
||||
bool isAimOn = customInput.GetButtonNoDefaultInput("RightClick");
|
||||
|
||||
customInput.ResetAllInput();
|
||||
|
||||
|
|
|
@ -48,6 +48,20 @@ namespace SanAndreasUnity.Utilities
|
|||
return Input.GetButton(name);
|
||||
}
|
||||
|
||||
public bool GetButtonNoDefaultInput(string name){
|
||||
if (!this.IsActive)
|
||||
return false;
|
||||
bool value = false;
|
||||
buttons.TryGetValue (name, out value);
|
||||
return value;
|
||||
}
|
||||
|
||||
public bool HasButton(string name){
|
||||
if (!this.IsActive)
|
||||
return false;
|
||||
return buttons.ContainsKey (name);
|
||||
}
|
||||
|
||||
public bool GetButtonDown(string name){
|
||||
if (!this.IsActive)
|
||||
return Input.GetButtonDown(name);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
- Chat
|
||||
|
||||
- Android: HUD must run before other UI scripts ; add perms for read/write access to storage ; forbid screen rotation ; vibrate when ped is damaged ; disable left and right mouse click ; vehicle touch input: forward, backward, handbrake, left & right ; weapon switching buttons ; states to implement hud: fly, ; circular button for movement ; buttons which don't work: aim, sprint, walk ; lock cursor when testing finishes ;
|
||||
- Android: HUD must run before other UI scripts ; add perms for read/write access to storage ; forbid screen rotation ; vibrate when ped is damaged ; disable left and right mouse click ; vehicle touch input: forward, backward, handbrake, left & right ; weapon switching buttons ; states to implement hud: fly, ; circular button for movement ; buttons which don't work: aim ; lock cursor when testing finishes ;
|
||||
|
||||
- Play sounds: horn ; empty weapon slot ; ped damage ; footsteps in run and sprint states ;
|
||||
|
||||
|
|
Loading…
Reference in a new issue