Files
FebGameJam/Assets/Scripts/collectable.cs
T
2022-02-27 03:32:43 -06:00

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);
}
}
}