Put the finishing touches on the microfauna Prepared the repository for database extraction
19 lines
No EOL
590 B
C#
19 lines
No EOL
590 B
C#
using Unity.Mathematics;
|
|
using UnityEngine;
|
|
using static Unity.Mathematics.math;
|
|
|
|
public class SlimeTestSpawner : MonoBehaviour
|
|
{
|
|
public Slime Target;
|
|
public string SpawnerTag;
|
|
|
|
private void Update()
|
|
{
|
|
var objects = GameObject.FindGameObjectsWithTag(SpawnerTag);
|
|
if (Target.SpawnPositions == null || Target.SpawnPositions.Length != objects.Length) Target.SpawnPositions = new Vector2[objects.Length];
|
|
for (var i = 0; i < objects.Length; i++)
|
|
{
|
|
Target.SpawnPositions[i] = objects[i].transform.position.Flatland();
|
|
}
|
|
}
|
|
} |