void Start() { attack = true; playerObj = GameObject.FindGameObjectWithTag("Player"); player = playerObj.GetComponent <playerStatScript>(); //Fetch the Renderer from the GameObject rend = GetComponent <Renderer>(); }
void Start() { playerStats = GameObject.FindGameObjectWithTag("Player").GetComponent <playerStatScript>(); itemSpawn = GameObject.FindGameObjectWithTag("SpawnSystem").GetComponent <ItemSpawn>(); }