private void OnTriggerEnter2D(Collider2D collision) { Player _player = collision.GetComponent <Player>(); if (_player) { _pickupAudioEvent.Play(_audioSource); Vector3 newPos = new Vector3(_startPos, _transform.position.y, _transform.position.z); _transform.position = newPos; _collectedCoin.Raise(); } }
public void GameOver() { _enableCanvas.Raise(); }