Astra.Components.Body2D
Corpo 2D: Corpo XY independente de física 3D. Família Física 2D · Corpos.
Namespace: Astra.Components · Assembly: Astra.Scripting · Tipo: Struct
Declaração
Seção intitulada “Declaração”readonly struct Astra.Components.Body2DCorpo 2D: Corpo XY independente de física 3D. Família Física 2D · Corpos.
Referência estudada: https://docs.godotengine.org/en/4.5/classes/class_rigidbody2d.html
Interfaces: Astra.Components.IComponentFacade<Astra.Components.Body2D>.
Consulte também Corpo 2D para propriedades, valores iniciais, requisitos e edição em Play.
Membros
Seção intitulada “Membros”| Membro | Categoria |
|---|---|
| .ctor | Method |
| Remove | Method |
| Wrap | Method |
| AllowSleep | Property |
| AngularDamping | Property |
| AngularVelocityDegrees | Property |
| Component | Property |
| FixedRotation | Property |
| GravityScale | Property |
| InstanceId | Property |
| IsAlive | Property |
| LinearDamping | Property |
| Mass | Property |
| Motion | Property |
| Object | Property |
| TypeId | Property |
| VelocityX | Property |
| VelocityY | Property |
.ctor
public Body2D(Astra.Component component)| Parâmetro | Tipo | Contrato |
|---|---|---|
component |
Astra.Component |
Remove
public void Remove()Remove a instância pelo ciclo nativo; dependências e ownership podem recusar.
Wrap
public static Astra.Components.Body2D Wrap(Astra.Component component)| Parâmetro | Tipo | Contrato |
|---|---|---|
component |
Astra.Component |
AllowSleep
public bool AllowSleep { get; set; }Permitir repouso
AngularDamping
public float AngularDamping { get; set; }Arrasto angular
Faixa válida: 0 a 100.
AngularVelocityDegrees
public float AngularVelocityDegrees { get; set; }Velocidade angular (graus/s)
Faixa válida: -36000 a 36000.
Component
public Astra.Component Component { get; }FixedRotation
public bool FixedRotation { get; set; }Fixar rotação
GravityScale
public float GravityScale { get; set; }Escala gravidade
Faixa válida: -100 a 100.
InstanceId
public ulong InstanceId { get; }IsAlive
public bool IsAlive { get; }LinearDamping
public float LinearDamping { get; set; }Arrasto linear
Faixa válida: 0 a 100.
Mass
public float Mass { get; set; }Massa (kg)
Faixa válida: 0.001 a 100000.
Motion
public Astra.Components.Body2D.MotionOption Motion { get; set; }Movimento
Object
public Astra.GameObject Object { get; }TypeId
public static string TypeId { get; }VelocityX
public float VelocityX { get; set; }Velocidade X (m/s)
Faixa válida: -10000 a 10000.
VelocityY
public float VelocityY { get; set; }Velocidade Y (m/s)
Faixa válida: -10000 a 10000.