using UnityEngine;
using System.Collections;

public class StarObj : MonoBehaviour {
	private bool m_alive = true;

	void OnTriggerEnter(Collider collisionInfo)
	{
		if ( m_alive && 
			( collisionInfo.gameObject.name == "Player" ||
			 collisionInfo.gameObject.name == "BodyBox" )
		)
		{
			Player.m_stars++;
			gameObject.renderer.enabled = false;
			enabled = false;
			m_alive = false;
		}
	}
}
