Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateFogMachineCloud()

void Terraria.Gore.UpdateFogMachineCloud ( )
inlineprivate

Definition at line 203 of file Gore.cs.

204 {
206 if (timeLeft <= 0)
207 {
208 active = false;
209 return;
210 }
211 bool flag = false;
212 Point point = (position + new Vector2(15f, 0f)).ToTileCoordinates();
213 if (WorldGen.SolidTile(Main.tile[point.X, point.Y]))
214 {
215 flag = true;
216 }
217 if (timeLeft <= 240)
218 {
219 flag = true;
220 }
221 if (!flag)
222 {
223 if (alpha > 225 && Main.rand.Next(2) == 0)
224 {
225 alpha--;
226 }
227 }
228 else
229 {
230 if (Main.rand.Next(2) == 0)
231 {
232 alpha++;
233 }
234 if (alpha >= 255)
235 {
236 active = false;
237 return;
238 }
239 }
241 }
Vector2 velocity
Definition Gore.cs:19
Vector2 position
Definition Gore.cs:17
int type
Definition Gore.cs:27
bool active
Definition Gore.cs:31
int alpha
Definition Gore.cs:25
int timeLeft
Definition Gore.cs:35
static int[] DisappearSpeed
Definition GoreID.cs:11

References Terraria.Gore.active, Terraria.Gore.alpha, Terraria.ID.GoreID.Sets.DisappearSpeed, Terraria.Gore.position, Terraria.Main.rand, Terraria.WorldGen.SolidTile(), Terraria.Main.tile, Terraria.Gore.timeLeft, Terraria.Gore.type, Terraria.Gore.velocity, Microsoft.Xna.Framework.Point.X, and Microsoft.Xna.Framework.Point.Y.

Referenced by Terraria.Gore.Update().