Пример #1
0
 void Start()
 {
     manager   = GameObject.Find("Manager").GetComponent <Manager>();
     objective = GameObject.Find("Objective").GetComponent <NextGoal>();
     player    = GameObject.FindWithTag("Player").GetComponent <PlayerMovement>();
     add       = GameObject.FindWithTag("Player").GetComponent <AddDucklingToFollow>();
 }
Пример #2
0
 void Start()
 {
     myname            = name;
     objective         = GameObject.Find("Objective").GetComponent <NextGoal>();
     hisname           = objective.shuffledGoals.First.Value.ToString().Split(' ')[0];
     add               = GameObject.FindWithTag("Player").GetComponent <AddDucklingToFollow>();
     pLight            = GetComponentInChildren <Light>();
     sphercoll         = this.GetComponent <SphereCollider>();
     pLight.enabled    = false;
     sphercoll.enabled = false;
     player            = GameObject.FindWithTag("Player").GetComponent <PlayerMovement>();
 }