DWTD/Assets/Scripts/Player/Hand.cs

29 lines
717 B
C#
Raw Normal View History

2024-09-03 23:08:09 +00:00
using Assets.Scripts;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hand : MonoBehaviour
{
private WeaponSelectMenu weaponSelectMenu;
// Start is called before the first frame update
private void Start()
{
weaponSelectMenu = GameObject.FindObjectOfType<WeaponSelectMenu>();
}
// Update is called once per frame
private void Update()
{
if (ControlsManager.Controls.RightHand.WeaponSelect.WasPressedThisFrame())
{
weaponSelectMenu.Show(this);
}
if (ControlsManager.Controls.RightHand.WeaponSelect.WasReleasedThisFrame())
{
weaponSelectMenu.Hide();
}
}
}