, .
Dragon Enemy?
Dragon, base, Dragon-Constructor . :
class Dragon : Enemy
{
public Dragon(string _name, int _health, int _attack, int _level) : base (_name, _health, _attack, _level)
{
}
}
You can even add some additional parameter to the constructor of your "dragon'-Class", which you do not need to pass to the base-Constructor, for example:
class Dragon : Enemy
{
public string DragonStuff { get; private set }
public Dragon(string _name, int _health, int _attack, int _level, string _dragonStuff) : base (_name, _health, _attack, _level)
{
DragonStuff = _dragonStuff;
}
}
source
share