You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
786 B
27 lines
786 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class WeaponItem : MonoBehaviour
|
|
{
|
|
public WeaponManager weaponManager;
|
|
public TMP_Text description;
|
|
public TMP_Text weaponName;
|
|
public TMP_Text weaponDamage;
|
|
public TMP_Text weaponCost;
|
|
public Weapon weapon;
|
|
public int weaponIndex;
|
|
public void Apply()
|
|
{
|
|
weaponManager.GetWeapon(weaponIndex);
|
|
description.text = weapon.description;
|
|
if(weapon.level == 0)
|
|
weaponName.text = weapon.weaponName;
|
|
else
|
|
weaponName.text = weapon.weaponName + " + " + weapon.level.ToString();
|
|
weaponDamage.text = weapon.basicDamage.ToString();
|
|
weaponCost.text = weapon.movementCost.ToString();
|
|
}
|
|
}
|