Пример #1
0
 void Start()
 {
     attack    = true;
     playerObj = GameObject.FindGameObjectWithTag("Player");
     player    = playerObj.GetComponent <playerStatScript>();
     //Fetch the Renderer from the GameObject
     rend = GetComponent <Renderer>();
 }
Пример #2
0
 void Start()
 {
     playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent <playerStatScript>();
     itemSpawn   = GameObject.FindGameObjectWithTag("SpawnSystem").GetComponent <ItemSpawn>();
 }