Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class Inventory : MonoBehaviour
- {
- public GameObject Inventar;
- private bool IsInvOpen;
- void Start()
- {
- Inventar.SetActive(false);
- IsInvOpen = false;
- }
- void Update()
- {
- if (Input.GetKeyDown(KeyCode.Q))
- {
- if (!IsInvOpen)
- {
- Inventar.SetActive(true);
- IsInvOpen = true;
- }
- else
- {
- Inventar.SetActive(false);
- IsInvOpen = false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement