Skip to content
Permalink
59c14523c9
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (26 sloc) 578 Bytes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Unit : MonoBehaviour
{
public string unitName;
public int unitLevel;
public int damage;
public int damage2;
public int maxHP;
public int currentHP;
public bool TakeDamage(int dmg)
{
currentHP -= dmg;
if (currentHP <= 0)
return true;
else
return false;
}
public void Heal(int amount)
{
currentHP += amount;
if (currentHP > maxHP)
currentHP = maxHP;
}
}