Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class KdTree<T> : IEnumerable<T>, IEnumerable where T : Component
{
protected KdNode _root;
protected KdNode _last;
protected int _count;
@ayyobro
ayyobro / HealthCollectable.cs
Created January 13, 2022 22:47
Example of HealthCollectable prefab script for respawning itself
using System.Collections;
using UnityEngine;
public class HealthCollectable : MonoBehaviour
{
public float health = 20.0f;
public float rotationSpeed = 25.0f;
public float cooldown = 1.0f;
private bool wasUsed = false;
public GameObject healthPrefab;