init
This commit is contained in:
commit
16da8e4dde
333 changed files with 109229 additions and 0 deletions
21
Assets/Scripts/Level/Guns/GunController.cs
Normal file
21
Assets/Scripts/Level/Guns/GunController.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/Level/Guns/GunController.cs.meta
Normal file
11
Assets/Scripts/Level/Guns/GunController.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f38af89adbebcb24f9727c2fae867700
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue