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

Shop Button Hover - show stats

parent 1b563b4e
No related branches found
No related tags found
No related merge requests found
Showing
with 9 additions and 3 deletions
No preview for this file type
No preview for this file type
......@@ -38,17 +38,23 @@ public class WeaponShopButton : MonoBehaviour {
public void OnClick() {
// this is where we will implement buying the weapons based on currency
// i.e. : if coins >= weaponCost, then ....
// if ( && cost.text != "PURCHASED"){
// coins -= weaponCost
// }
// WILL DO LATER - for now, just change weapon
stats.setWeapon(weapons[weaponNumber]);
cost.text = "PURCHASED";
}
// to display weapon stats when you hover over a weapon
public void HoverEnter() {
description.text = "Damage:\n" + weapons[weaponNumber].damageMin.ToString() + " - "
+ weapons[weaponNumber].damageMax.ToString() + "\n\n" + "Attack Speed:\n"
+ weapons[weaponNumber].attackSpeed.ToString();
}
// to revert back to the original button
// to revert back to the original description
public void HoverExit() {
description.text = weapons[weaponNumber].weaponDescription;
}
}
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