Skip to content
Snippets Groups Projects
Commit 1b563b4e authored by Michael LaFreniere's avatar Michael LaFreniere
Browse files

Shop - Dynamic Sprite

parent 3a494d7c
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 1 deletion
No preview for this file type
......@@ -55,6 +55,7 @@
<Compile Include="Assets\Scripts\EnemyHealth.cs" />
<Compile Include="Assets\Scripts\EnterDoor.cs" />
<Compile Include="Assets\Scripts\MainMenu.cs" />
<Compile Include="Assets\Scripts\PlayerHealth.cs" />
<Compile Include="Assets\Scripts\PlayerMovement.cs" />
<Compile Include="Assets\Scripts\PlayerStats.cs" />
<Compile Include="Assets\Scripts\ShopMenu.cs" />
......
No preview for this file type
......@@ -10,6 +10,7 @@ public class WeaponShopButton : MonoBehaviour {
public Text wepName;
public Text description;
public Text cost;
public Image imageDisplay;
private WeaponStats[] weapons;
// Use this for initialization
......@@ -31,6 +32,7 @@ public class WeaponShopButton : MonoBehaviour {
wepName.text = weapons[weaponNumber].weaponName;
description.text = weapons[weaponNumber].weaponDescription;
cost.text = costToString;
imageDisplay.sprite = weapons[weaponNumber].image;
}
public void OnClick() {
......@@ -39,4 +41,14 @@ public class WeaponShopButton : MonoBehaviour {
// WILL DO LATER - for now, just change weapon
stats.setWeapon(weapons[weaponNumber]);
}
// to display weapon stats when you hover over a weapon
public void HoverEnter() {
}
// to revert back to the original button
public void HoverExit() {
}
}
No preview for this file type
No preview for this file type
sceneSetups:
- path: Assets/Scenes/arena.unity
- path: Assets/Scenes/shopBlacksmith.unity
isLoaded: 1
isActive: 1
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment