(client) feat:实现子弹定义 chore:将建筑碰撞体改为方形

This commit is contained in:
m0_75251201
2025-08-14 13:26:02 +08:00
parent 35924f3695
commit 12a4f9efaa
10 changed files with 287 additions and 10 deletions

View File

@ -0,0 +1,18 @@
using System;
using UnityEngine;
namespace Entity
{
public class Bullet:Entity
{
protected override void AutoBehave()
{
TryMove();
}
private void OnTriggerEnter2D(Collider2D other)
{
other.GetComponent<Entity>()?.OnHit(this);
}
}
}