Added health, respawning and Bullet spawners

This commit is contained in:
2022-04-18 00:32:24 +02:00
parent 1bd6d79672
commit 209470d610
227 changed files with 53417 additions and 40 deletions

View File

@@ -4,14 +4,16 @@ using UnityEngine;
public enum PatternTypes
{
DEFAULT
DEFAULT,
DOUBLE_SPINNING,
QUADRUPLE_SPINNING,
}
[System.Serializable]
public class PatternMap
{
public PatternTypes patternType;
public Pattern pattern;
public GameObject pattern;
}
public class BulletManager : MonoBehaviour
{
@@ -31,8 +33,10 @@ public class BulletManager : MonoBehaviour
}
public Pattern SpawnPattern(PatternTypes pattern)
public void SpawnPattern(PatternTypes pattern, Enemy enemy)
{
return null;
GameObject patternObject = Instantiate(PatternMap.Find(x => x.patternType == pattern).pattern, enemy.transform.position, Quaternion.identity);
Pattern patternScript = patternObject.GetComponent<Pattern>();
patternScript.enemy = enemy;
}
}