Пример #1
0
        /// <summary>
        /// Get the status of the <see cref="PhysicsEntity"/>.
        /// The type of status can be specified by choosing from for example <see cref="DynamicsStatus"/>, <see cref="LivingStatus"/>, or <see cref="VehicleStatus"/>.
        /// </summary>
        /// <typeparam name="T">The type of the <see cref="BasePhysicsStatus"/> to be retrieved, for example <see cref="DynamicsStatus"/></typeparam>
        /// <returns></returns>
        public T GetStatus <T>() where T : BasePhysicsStatus, new()
        {
            var status       = new T();
            var nativeStatus = status.ToBaseNativeStatus();

            NativeHandle.GetStatus(nativeStatus);
            status.NativeToManaged(nativeStatus);
            return(status);
        }