Chain method calls, drop intermediate vars
This commit is contained in:
@@ -123,18 +123,15 @@ fn spawn_player(
|
|||||||
..default()
|
..default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let thruster = commands.spawn(thruster_mesh).id();
|
commands.spawn((
|
||||||
|
|
||||||
let mut ship_id = commands.spawn((
|
|
||||||
Ship,
|
Ship,
|
||||||
Position(Vec2::default()),
|
Position(Vec2::default()),
|
||||||
Velocity(Vec2::ZERO),
|
Velocity(Vec2::ZERO),
|
||||||
Rotation(0.0),
|
Rotation(0.0),
|
||||||
ship_mesh,
|
ship_mesh,
|
||||||
ThrusterColors(thruster_firing_id, thruster_stopped_id),
|
ThrusterColors(thruster_firing_id, thruster_stopped_id),
|
||||||
));
|
)).with_child(thruster_mesh);
|
||||||
|
|
||||||
ship_id.add_child(thruster);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user