private Movement DumpMovement(Transform transform, Rigidbody rigidbody, TankCollidersUnityComponent tankCollidersUnity) => new Movement { Position = TankPositionConverter.ConvertedSentToServer(tankCollidersUnity), Orientation = transform.rotation, Velocity = rigidbody.velocity, AngularVelocity = rigidbody.angularVelocity };
private Movement GetMovement(TankNode tankNode) { if (PreciseTime.TimeType == TimeType.LAST_FIXED) { return(tankNode.tankMovementSender.LastPhysicsMovement); } return(new Movement { Position = TankPositionConverter.ConvertedSentToServer(tankNode.tankCollidersUnity), Orientation = tankNode.rigidbody.RigidbodyTransform.rotation, Velocity = this.GetVelocity(tankNode), AngularVelocity = tankNode.rigidbody.Rigidbody.angularVelocity }); }