Added skills to char window, added house information

This commit is contained in:
Nicola Sovic
2022-02-24 13:25:35 +01:00
parent e5e2ad6768
commit 61b81da607
19 changed files with 1254 additions and 20 deletions

View File

@@ -16,6 +16,7 @@ namespace Assets.Scripts
int cooldown;
int maxCooldown;
string skillname;
string description;
Texture skillIcon;
GameObject skillAnimation;
@@ -31,6 +32,11 @@ namespace Assets.Scripts
this.skillAnimation = skillAnimation;
}
public void setDescription(string desc)
{
description = desc;
}
public int calculateDamage(int attribute, bool isCrit)
{
cooldown = maxCooldown;
@@ -64,6 +70,12 @@ namespace Assets.Scripts
}
}
public void displaySkill(GameObject image, GameObject desc)
{
image.GetComponent<RawImage>().texture = skillIcon;
desc.GetComponent<Text>().text = skillname + "(Lvl." + level + "): \r\n" + description;
}
public void reduceCooldown()
{
if (cooldown > 0)