(client) chore:Clean code

This commit is contained in:
2025-08-28 16:20:24 +08:00
parent 909e995e15
commit c3bff1cf88
76 changed files with 5689 additions and 445 deletions

View File

@ -1,7 +1,5 @@
using System;
using Base;
using Data;
using Prefab;
using UnityEngine;
namespace Entity
@ -10,7 +8,7 @@ namespace Entity
{
public Entity bulletSource;
public float lifeTime = 10;
public override void SetTarget(Vector3 pos)
{
base.SetTarget(pos);
@ -20,7 +18,7 @@ namespace Entity
protected override void AutoBehave()
{
TryMove();
lifeTime-=Time.deltaTime;
lifeTime -= Time.deltaTime;
if (lifeTime <= 0)
{
Kill();
@ -55,7 +53,7 @@ namespace Entity
// 计算当前向上方向与目标方向之间的角度
var angle = Mathf.Atan2(targetDirection.y, targetDirection.x) * Mathf.Rad2Deg;
// 应用旋转
transform.rotation = Quaternion.Euler(0f, 0f, angle);