Created
April 19, 2016 05:30
-
-
Save HassakuTb/46413f772322b39331556fc3d59ae625 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[CreateAssetMenu(menuName = "ScriptableObject/Enemy", fileName = "NewEnemy")] | |
public class Enemy : ScriptableObject{ | |
public string Name; | |
public int HpMax; | |
public int Power; | |
private int hp; | |
protected virtual void OnEnable() { | |
hp = HpMax; | |
} | |
public virtual void Damage(int damageValue){ | |
hp -= damageValue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment