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

@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static UnityEngine.ParticleSystem;
public class RotatingPattern : Pattern
{
public float speed = 1;
// Start is called before the first frame update
void Start()
{
}
public override void OnPatternUpdate()
{
// transform.Rotate(Vector3.up, speed * Time.deltaTime);
//find all particle systems in children
ParticleSystem[] systems = GetComponentsInChildren<ParticleSystem>();
foreach (ParticleSystem system in systems)
{
ShapeModule shape = system.shape;
shape.rotation = new Vector3(0, shape.rotation.y + speed * Time.deltaTime, 0);
}
}
}