fix:补充ai行为流程

This commit is contained in:
bzx
2025-09-24 11:10:05 +08:00
parent d648a31930
commit d37bb0ae35
25 changed files with 742 additions and 310 deletions

View File

@@ -123,9 +123,12 @@ public class Bullet : NetworkBehaviour
#endregion
[Server]
public virtual void OnSpawn(int ownerIndex, Vector3 recoil, float recoilCount)
public virtual void OnSpawn(int curOwnerIndex, Vector3 recoil, float recoilCount)
{
this.ownerIndex = ownerIndex;
if (curOwnerIndex != -1)
ownerIndex = curOwnerIndex;
rigidbodyComponent.velocity = recoil.normalized * recoilCount;
rigidbodyComponent.rotation = Quaternion.LookRotation(recoil.normalized);
}