/
EugenyCh7
/
Puppet2D.Net
Обзор
Документация
Войти
/
EugenyCh7
/
Puppet2D.Net
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Puppet2D.Engine/Common/Explosion.cs
51 строка
2 KB
EugenyCh7
Puppet2D.Engine.Common fix
24 авг 2025, 20:48
24 авг 2025, 20:48
6ed4095
Код
Авторство
О чём код?
using Puppet2D.System; namespace Puppet2D.Engine.Common { /// <summary> /// The explosion definition is used to configure options for explosions. /// Explosions consider shape geometry when computing the impulse. /// </summary> public struct Explosion { /// <summary> /// Mask bits to filter shapes. /// </summary> public ulong MaskBits { get; set; } /// <summary> /// The center of the explosion in world space. /// </summary> public Vector2 Position { get; set; } /// <summary> /// The radius of the explosion. /// </summary> public float Radius { get; set; } /// <summary> /// The falloff distance beyond the radius. Impulse is reduced to zero at this distance. /// </summary> public float Falloff { get; set; } /// <summary> /// Impulse per unit length. /// This applies an impulse according to the shape perimeter that is facing the explosion. /// Explosions only apply to circles, capsules, and polygons. /// This may be negative for implosions. /// </summary> public float ImpulsePerLength { get; set; } internal B2.ExplosionDef Cast() { return new B2.ExplosionDef { maskBits = MaskBits, position = Position, radius = Radius, falloff = Falloff, impulsePerLength = ImpulsePerLength }; } } }