Skip to content

Instantly share code, notes, and snippets.

@GT3000
Created November 23, 2021 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GT3000/a5d233af2bd9046d8c12b4f4e043f65c to your computer and use it in GitHub Desktop.
Save GT3000/a5d233af2bd9046d8c12b4f4e043f65c to your computer and use it in GitHub Desktop.
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