Skip to content
Snippets Groups Projects
Commit dc6ae203 authored by Nat10k's avatar Nat10k
Browse files

scroll to change weapon

parent 98e48906
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,12 @@ namespace Nightmare
// Add the time since Update was last called to the timer.
timer += Time.deltaTime;
if (Input.GetAxis("Mouse ScrollWheel") != 0)
{
currWeaponIdx -= Mathf.RoundToInt(Mathf.Sign(Input.GetAxis("Mouse ScrollWheel")));
ChangeWeapon(currWeaponIdx);
}
if (Input.GetKeyDown(KeyCode.Alpha1))
{
ChangeWeapon(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment