UI update 02

This commit is contained in:
FloatGaming
2026-06-30 21:21:30 +08:00
parent b2a1e307a4
commit f62f643cfc
1666 changed files with 211081 additions and 22799 deletions
@@ -0,0 +1,30 @@
using UnityEngine;
namespace KD.Destro2D{
public class BasicMissile : MonoBehaviour
{
public GameObject DestructionObject;
public GameObject effect;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
Destroy(this.gameObject,4f);
}
// Update is called once per frame
void Update()
{
}
void OnCollisionEnter2D(Collision2D collision)
{
Vector2 hitPoint = collision.contacts[0].point;
if(this!= null){
Instantiate(DestructionObject,hitPoint,Quaternion.identity);
Instantiate(effect,hitPoint,Quaternion.identity);
Destroy(this.gameObject);
}
}
}
}