18 lines
317 B
C#
18 lines
317 B
C#
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);
|
|
}
|
|
}
|
|
} |