mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix particle emitter spray cone angle being properly updated (#5720)
This commit is contained in:
@@ -243,8 +243,8 @@ namespace gdjs {
|
||||
setAngle(angle1: float, angle2: float): void {
|
||||
// Access private members of the behavior to apply changes right away.
|
||||
const behavior: any = this.emitter.getBehavior('rotation');
|
||||
behavior.minStart = angle1;
|
||||
behavior.maxStart = angle2;
|
||||
behavior.minStart = gdjs.toRad(angle1);
|
||||
behavior.maxStart = gdjs.toRad(angle2);
|
||||
}
|
||||
|
||||
setForce(min: float, max: float): void {
|
||||
@@ -311,8 +311,8 @@ namespace gdjs {
|
||||
setParticleRotationSpeed(min: float, max: float): void {
|
||||
// Access private members of the behavior to apply changes right away.
|
||||
const behavior: any = this.emitter.getBehavior('rotation');
|
||||
behavior.minSpeed = min;
|
||||
behavior.maxSpeed = max;
|
||||
behavior.minSpeed = gdjs.toRad(min);
|
||||
behavior.maxSpeed = gdjs.toRad(max);
|
||||
}
|
||||
|
||||
setMaxParticlesCount(count: float): void {
|
||||
|
@@ -282,7 +282,7 @@ export default class ParticleEmitterEditor extends React.Component<
|
||||
type="number"
|
||||
value={particleEmitterConfiguration.getFlow()}
|
||||
onChange={value => {
|
||||
particleEmitterConfiguration.setFlow(parseInt(value, 10) || 0);
|
||||
particleEmitterConfiguration.setFlow(parseFloat(value) || 0);
|
||||
this.forceUpdate();
|
||||
}}
|
||||
/>
|
||||
@@ -298,7 +298,7 @@ export default class ParticleEmitterEditor extends React.Component<
|
||||
value={particleEmitterConfiguration.getEmitterForceMin()}
|
||||
onChange={value => {
|
||||
particleEmitterConfiguration.setEmitterForceMin(
|
||||
parseInt(value, 10) || 0
|
||||
parseFloat(value) || 0
|
||||
);
|
||||
this.forceUpdate();
|
||||
}}
|
||||
@@ -313,7 +313,7 @@ export default class ParticleEmitterEditor extends React.Component<
|
||||
value={particleEmitterConfiguration.getEmitterForceMax()}
|
||||
onChange={value => {
|
||||
particleEmitterConfiguration.setEmitterForceMax(
|
||||
parseInt(value, 10) || 0
|
||||
parseFloat(value) || 0
|
||||
);
|
||||
this.forceUpdate();
|
||||
}}
|
||||
@@ -328,7 +328,7 @@ export default class ParticleEmitterEditor extends React.Component<
|
||||
value={particleEmitterConfiguration.getConeSprayAngle()}
|
||||
onChange={value => {
|
||||
particleEmitterConfiguration.setConeSprayAngle(
|
||||
parseInt(value, 10) || 0
|
||||
parseFloat(value) || 0
|
||||
);
|
||||
this.forceUpdate();
|
||||
}}
|
||||
@@ -341,7 +341,7 @@ export default class ParticleEmitterEditor extends React.Component<
|
||||
value={particleEmitterConfiguration.getZoneRadius()}
|
||||
onChange={value => {
|
||||
particleEmitterConfiguration.setZoneRadius(
|
||||
parseInt(value, 10) || 0
|
||||
parseFloat(value) || 0
|
||||
);
|
||||
this.forceUpdate();
|
||||
}}
|
||||
|
Reference in New Issue
Block a user