Merge branch 'master' of https://github.com/saibotk/Bildschirmflausch.LD41
This commit is contained in:
commit
f0899aa54e
3 changed files with 22 additions and 3 deletions
8
Assets/Scripts/Entities/Collectable.cs
Normal file
8
Assets/Scripts/Entities/Collectable.cs
Normal 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) {}
|
||||||
|
}
|
11
Assets/Scripts/Entities/Collectable.cs.meta
Normal file
11
Assets/Scripts/Entities/Collectable.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a1c36145cdffcde4c83f575b19b85c88
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -2,7 +2,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Entity {
|
public abstract class Entity {
|
||||||
EntityObjective referringObjective;
|
EntityObjective referringObjective;
|
||||||
GameObject entityPrefab;
|
GameObject entityPrefab;
|
||||||
GameObject instance;
|
GameObject instance;
|
||||||
|
@ -17,8 +17,8 @@ public class Entity {
|
||||||
// spawns the entity
|
// spawns the entity
|
||||||
public void Spawn(Transform spawnPoint)
|
public void Spawn(Transform spawnPoint)
|
||||||
{
|
{
|
||||||
instance = GameObject.Instantiate (entityPrefab);
|
// instance = GameObject.Instantiate (entityPrefab);
|
||||||
instance.transform = spawnPoint;
|
// instance.transform = spawnPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
// kills the entity
|
// kills the entity
|
||||||
|
|
Loading…
Add table
Reference in a new issue