Example #1
0
 void Start()
 {
     checkAllObjectives             = GetComponent <CheckAllObjectives>();
     checkAllObjectives.OnComplete += Spawn;
     go = Instantiate(prefab, transform.position + prefab.transform.position, prefab.transform.rotation);
     if (go.GetComponent <ITrigger>() != null && transform.parent && transform.parent.GetComponent <CheckAllObjectives>())
     {
         transform.parent.GetComponent <CheckAllObjectives>().AddObjective(go.GetComponent <ITrigger>());
     }
     go.SetActive(false);
 }
Example #2
0
 void Awake()
 {
     checkAllObjectives             = GetComponent <CheckAllObjectives>();
     checkAllObjectives.OnComplete += Open;
 }