public void UpdateShop() { CurrentWeapon.sprite = mouseWeapon.gameCursorSprite; NextWeapon.sprite = prefabManager.GetWeaponSprite(mouseWeapon.cursorID + 1); Upgrade.gameObject.GetComponent <Image>().sprite = (HasEnoughMoney()) ? upgradeActiveSprite : upgradeInactiveSprite; AmountForUpgrade.text = GetWeaponPrice(mouseWeapon.cursorID + 1).ToString(); }
// Use this for initialization void Start() { prefabManager = FindObjectOfType <PrefabManager>(); mouseWeapon = FindObjectOfType <MouseWeapon>(); audioManager = FindObjectOfType <AudioManager>(); puppet = FindObjectOfType <Puppet>(); gameGUI = FindObjectOfType <GameGUICanvas>(); shop = FindObjectOfType <Shop>(); spawnCreditsTimer = new Timer(4f); UpgradeSprite = prefabManager.GetWeaponSprite(PrefabManager.E_WEAPON.GLOVE); }
public void SetSprite(PrefabManager.E_WEAPON _weapon) { gameCursorSprite = manager.GetWeaponSprite(_weapon); }