The information in this article is for Terraria v18.104.22.168.
The cloud class is probably one of the least used classes in the game, simply because very few mods would need to care about what the clouds are doing. Nevertheless, there are a variety of methods to adjust how the clouds behave in the game.
An object containing the location information about this cloud, including its (X, Y) position.
The x-coordinate of the cloud in the world. Note that this is a member of position.
The y-coordinate of the cloud in the world. Note that this is a member of position.
A multiplier applied to the size of the sprite. A new cloud will have a scale value somewhere between 0.80f and 1.20f times it's normal sprite size. It seems to have an absolute limit of 0.60f to 1.40f, however.
How much the cloud's sprite is rotated. Appears to vary between -0.01f and 0.01f for a new cloud, although the absolute ranges are from -0.05f to 0.05f.
The speed at which the cloud rotates. Value is adjusted every tick, and a typical value here is between -0.0007f and 0.0007f.
The speed that a cloud changes it's scale size. Used to make it appear "puffier". Ranges between -0.0007f and 0.0007f.
As there seems to be a hard limit of 100 clouds onscreen at a time, this appears to be a flag indicating whether a particular cloud in the Main.cloud array is available to be overwritten with new cloud data.
Which type of cloud it is. There's a total of 4 different sprites, depending. I won't bother listing them here, because hey, they're clouds.
The width of the cloud in pixels. Equal to the sprite's width multiplied by the scale.
The height of the cloud in pixels. Equal to the sprite's height multiplied by the scale.
Note that this is a private variable, meaning only clouds can reference it. It functions as an internal random object so that clouds behave consistently from one runtime to another. You may or may not be able to interact with it.
Returns a copy of the instance. This allows you to make changes to the object's data without affecting the original.
Returns a copy of the instance
public void Update()
Seems to update all of a particular cloud's variables. Not sure when it's invoked, but should be called every tick. You could make a particular cloud update more frequently, but the end result would likely make it move too quickly.