Commit c2f1d8b9 authored by Luke A Smith's avatar Luke A Smith

Merge branch 'hazard' into 'master'

Hazard

See merge request !19
parents 50916e2f 9b7f4f64
using UnityEngine;
using System.Collections;
public class BreakawayPlatform : MonoBehaviour {
public float timeTilBreak = 3f;
private void Break(){
Destroy (gameObject);
}
private void OnCollisionEnter2D (Collision2D col) {
if (col.gameObject.CompareTag ("Player")) {
Invoke("Break", timeTilBreak);
}
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment