Created
August 10, 2016 04:39
-
-
Save anonymous/22db9e4d173fb116d69eeafdb559a02b 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 Bricks : MonoBehaviour { | |
public int maxHits; | |
private int TimesHit; | |
private LevelManager levelManager; | |
// Use this for initialization | |
void Start () { | |
levelManager=GameObject.FindObjectOfType<LevelManager>(); | |
TimesHit=0; | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
void OnCollisionEnter2D (Collision2D collision){ | |
TimesHit++; | |
SimulateWin (); | |
} | |
//TODO Remove this method once we can actually win! | |
void SimulateWin(){ | |
levelManager.LoadNextLevel (); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment