fix:补充ai行为流程
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user