コード例 #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
ファイル: Item.cs プロジェクト: Berkaydanadam/Top-Down-Zombie
 void Start()
 {
     playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent <playerStatScript>();
     itemSpawn   = GameObject.FindGameObjectWithTag("SpawnSystem").GetComponent <ItemSpawn>();
 }