Last active
November 7, 2022 03:48
-
-
Save saitocastel1900/b98e5c6e955a514ab9d534f8ad86f091 to your computer and use it in GitHub Desktop.
This file contains 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 System; | |
using UnityEngine; | |
public class Auger :Enemy,IDisposable | |
{ | |
public Auger(string name,int hp) | |
{ | |
_name = name; | |
_hp = hp; | |
} | |
public override string GetName() => this.name; | |
public override int GetHp() => this._hp; | |
public override void Attack(int damaged) | |
{ | |
Debug.Log($"{this._name}へ攻撃"); | |
_hp -= damaged; | |
if (this._hp <= 0) this.Dispose(); | |
} | |
public void Dispose() | |
{ | |
Debug.Log($"{this._name}は倒されました"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment