1
0
Fork 0
Bildschirmflausch-LD41/Assets/Scripts/Entities/Entity.cs
2018-04-21 17:27:28 +02:00

20 lines
419 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class Entity : MonoBehaviour{
EntityObjective referringObjective;
// Constructor
public Entity(EntityObjective referringObjective)
{
this.referringObjective = referringObjective;
}
// kills the entity
public void Kill()
{
if(referringObjective != null)
referringObjective.Remove (this.gameObject);
}
}