Наследование: PackUnpackableBehaviour
Пример #1
0
 // Use this for initialization
 void Start()
 {
     audio           = GetComponent <AudioSource>();
     globalVariables = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GlobalVariables> ();
     collectItems    = GameObject.Find("ItemTrigger").GetComponent <CollectItems> ();
     pos             = new Vector3(transform.position.x, transform.position.y + above, transform.position.z);
     Exclamation.transform.position = pos;
     compass = GameObject.FindGameObjectWithTag("Compass").GetComponent <Compass> ();
 }
Пример #2
0
 private void Awake()
 {
     if (_globalInstance != null && _globalInstance != this)
     {
         Debug.LogError("Multiple instances found");
         Destroy(this.gameObject);
     }
     else
     {
         _globalInstance = this;
     }
 }
Пример #3
0
 // Use this for initialization
 private void Start()
 {
     _collect = Player.GetComponent <CollectItems>();
     _sort    = FindObjectsOfType <SortItems>().FirstOrDefault(p => p.Color == Player.Color);
 }