public void OnTriggerEnter2D(Collider2D other) { bool foundColour = false; if (other.tag == "Player") { SimplePlayer player = other.GetComponent <SimplePlayer>(); player.changeAttackColour(colourRGB); au.Play(); Destroy(gameObject); } }
public void OnTriggerEnter2D(Collider2D other) { bool foundColour = false; if (other.tag == "Player") { SimplePlayer player = other.GetComponent <SimplePlayer>(); player.changeAttackColour(colourRGB); au.Play(); Destroy(gameObject); } }