Created
May 3, 2020 18:39
-
-
Save jordanorelli/8d899e579fcbe94b2c2e04d97dde534d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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