Newer
Older
HardPoint-Project-Abertay-University-Unity3D / Assets / Scripts / WeaponUI.cs
@Rackday Rackday on 18 Aug 2024 365 bytes Project Added
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class WeaponUI : MonoBehaviour
  6. {
  7. [SerializeField] private WeaponScript ws;
  8. [SerializeField] private Image t;
  9. // Update is called once per frame
  10. void Update()
  11. {
  12. t.sprite = ws.weapons[ws.currentWeapon].displaySprite;
  13. }
  14. }