Near finish
This commit is contained in:
14
Assets/Scripts/NearMiss.cs
Normal file
14
Assets/Scripts/NearMiss.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class NearMiss : MonoBehaviour
|
||||
{
|
||||
void OnTriggerExit2D(Collider2D other){
|
||||
if(PlayerController.instance.PowerupActive){return;}
|
||||
if(other.tag == "asteroid"){
|
||||
DataManager.AddItem("add_near_miss.php");
|
||||
PlayerController.NearMissFX();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user