Creating:
public interface IKillAble
{
void Kill();
}
Implenting:
using UnityEngine;
using System.Collections;
public class PlayerStats : MonoBehaviour,IKillAble
{
private float health;
void Update()
{
Debug.Log (health);
Kill(); //i use this to implent the interface am i doing it correctly?
}
public void Kill()
{
health -= 1f;
}
}