Beispiel #1
0
 private void Awake()
 {
     if (PlantStats.instance == null)
     {
         instance = this;
     }
     else
     {
         Debug.Log("An instance of PlantStats already exists. Calling Destroy(gameObject) on the duplicate instance");
         Destroy(gameObject);
     }
 }
Beispiel #2
0
 void Awake()
 {
     instance = this;
 }
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     PS = GetComponent <PlantStats>();
 }