using UnityEngine; namespace CreatureControl { public class Pheromone : Odorant { public float duration = 30; // seconds public enum Type { Unknown = 0, Food = 82, Home = 83 }; public Type type = 0; void Update() { this.strength -= (Time.deltaTime / duration); if (this.strength < 0) { // Debug.Log($"destroyed {this.name}"); Destroy(this.gameObject); } } } }