Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jordanorelli
Created May 3, 2020 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordanorelli/8d899e579fcbe94b2c2e04d97dde534d to your computer and use it in GitHub Desktop.
Save jordanorelli/8d899e579fcbe94b2c2e04d97dde534d to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TracerDot : MonoBehaviour {
private float spawned;
void Start() {
spawned = Time.time;
}
void OnDrawGizmos() {
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(transform.position, 0.125f);
}
void Update() {
if (Time.time - spawned > 2) {
Destroy(gameObject);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment