mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
17 lines
395 B
C#
17 lines
395 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class collectable : MonoBehaviour
|
|
{
|
|
public int collect =0;
|
|
public BoxCollider2D box;
|
|
public void OnTriggerEnter2D(Collider2D col)
|
|
{
|
|
if (col.gameObject.tag == "Player") {
|
|
box.isTrigger = true;
|
|
this.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|