Exemple #1
0
 // Start is called before the first frame update
 void Awake()
 {
     playerPositionsSet.Clear();
     foreach (Transform tr in transform)
     {
         playerPositionsSet.Add(tr);
     }
 }
    public void OnTriggerEnter(Collider other)
    {
        Thing thing = other.gameObject.GetComponent <Thing>();

        if (thing != null)
        {
            Debug.Log(other.gameObject.name + " This was added to  " + this.gameObject.name.ToString());
            Set.Add(thing);
        }
    }
Exemple #3
0
 private void OnEnable()
 {
     RuntimeSet.Add(this);
 }
Exemple #4
0
 private void OnDisable()
 {
     EnabledObjects.Remove(this);
     DisabledObjects.Add(this);
 }
Exemple #5
0
 private void OnEnable()
 {
     RuntimeSet.Add(this.transform);
 }