23 lines
524 B
C#
23 lines
524 B
C#
using UnityEngine;
|
|
|
|
public class Pheromone : Odorant {
|
|
//public float strength = 30; // seconds
|
|
public float duration = 30;
|
|
|
|
public enum Type {
|
|
Unknown = 0,
|
|
Food = 82,
|
|
Home = 83
|
|
};
|
|
public Type type = 0;
|
|
|
|
// Update is called once per frame
|
|
void Update() {
|
|
this.strength -= (Time.deltaTime / duration);
|
|
if (this.strength < 0) {
|
|
// Debug.Log($"destroyed {this.name}");
|
|
Destroy(this.gameObject);
|
|
}
|
|
}
|
|
}
|