Example #1
0
    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();
        }
    }
Example #2
0
 public void GameOver()
 {
     _enableCanvas.Raise();
 }