This commit is contained in:
Gerard Gascón 2025-04-24 17:09:22 +02:00
commit 16da8e4dde
333 changed files with 109229 additions and 0 deletions

View file

@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GunController : MonoBehaviour, IPooledObject{
// Start is called before the first frame update
public void OnObjectSpawn(){
StartCoroutine(Remove());
}
IEnumerator Remove(){
yield return new WaitForSeconds(12f);
gameObject.SetActive(false);
}
void OnTriggerEnter2D(Collider2D col){
if(col.gameObject.tag == "Player"){
gameObject.SetActive(false);
}
}
}