This commit is contained in:
Gerard Gascón 2025-04-24 16:56:52 +02:00
commit 862afc9b7a
478 changed files with 197737 additions and 0 deletions

View file

@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WeaponDisplay : MonoBehaviour
{
public GameObject addWeap;
public Image weaponDisplay;
//public GameObject addWeap2;
// Start is called before the first frame update
void Start()
{
Inventory.addItem(addWeap);
//Inventory.addItem(addWeap2);
}
// Update is called once per frame
void Update() {
if (Inventory.Items.Count > 0) {
weaponDisplay.sprite = Inventory.getActiveItem().GetComponentInChildren<SpriteRenderer>().sprite;
}
}
public void nextWeapon() {
Debug.Log("nextwep");
Inventory.cycleItem();
}
}