Created
September 22, 2015 00:14
-
-
Save Templar2020/3b9a5f3a67d808479f33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class CoinPickup : MonoBehaviour { | |
public int pointsToAdd; | |
void OnTriggerEnter2D (Collider2D other) | |
{ | |
if(other.GetComponent<PlayerController>()== null) | |
return; | |
ScoreManager.AddPoints(pointsToAdd); | |
Destroy (gameObject); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment