Created
November 23, 2021 07:31
-
-
Save GT3000/49c7b17fc4b578e148506ea6af635a15 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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//interfaces dont derive form anything | |
public interface IDamagable | |
{ | |
//they only use properties which are empty since its just a "contract" | |
int Health | |
{ | |
get; | |
set; | |
} | |
//and empty methods which outline the derived class obligations | |
void Damage(int damageAmount); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment