Created
November 23, 2021 08:22
-
-
Save GT3000/a5d233af2bd9046d8c12b4f4e043f65c 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; | |
//replacinig int with the T keyword allows you to use anything in the place of T | |
//however you must explicitly code the type into each implementation of IDamagable | |
public interface IDamagable<T> | |
{ | |
T Health | |
{ | |
get; | |
set; | |
} | |
void Damage(T damageAmount); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment