Skip to content

Instantly share code, notes, and snippets.

@GT3000
Created November 23, 2021 07:31
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/49c7b17fc4b578e148506ea6af635a15 to your computer and use it in GitHub Desktop.
Save GT3000/49c7b17fc4b578e148506ea6af635a15 to your computer and use it in GitHub Desktop.
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