1
0
Fork 0
This commit is contained in:
Jan 2018-04-21 16:26:25 +02:00
commit f0899aa54e
3 changed files with 22 additions and 3 deletions

View file

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Collectable : Entity{
public Collectable (EntityObjective referringObjective, GameObject entityPrefab) : base(referringObjective, entityPrefab) {}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a1c36145cdffcde4c83f575b19b85c88
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
public class Entity {
public abstract class Entity {
EntityObjective referringObjective;
GameObject entityPrefab;
GameObject instance;
@ -17,8 +17,8 @@ public class Entity {
// spawns the entity
public void Spawn(Transform spawnPoint)
{
instance = GameObject.Instantiate (entityPrefab);
instance.transform = spawnPoint;
// instance = GameObject.Instantiate (entityPrefab);
// instance.transform = spawnPoint;
}
// kills the entity