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

◆ UpdateAmbientAirborneCloud()

void Terraria.Gore.UpdateAmbientAirborneCloud ( )
inlineprivate

Definition at line 156 of file Gore.cs.

157 {
159 if (timeLeft <= 0)
160 {
161 active = false;
162 return;
163 }
164 bool flag = false;
165 Point point = (position + new Vector2(15f, 0f)).ToTileCoordinates();
166 rotation = velocity.ToRotation();
167 Tile tile = Main.tile[point.X, point.Y];
168 if (tile == null)
169 {
170 active = false;
171 return;
172 }
173 if (WorldGen.SolidTile(tile))
174 {
175 flag = true;
176 }
177 if (timeLeft <= 60)
178 {
179 flag = true;
180 }
181 if (!flag)
182 {
183 if (alpha > 240 && Main.rand.Next(5) == 0)
184 {
185 alpha--;
186 }
187 }
188 else
189 {
190 if (Main.rand.Next(5) == 0)
191 {
192 alpha++;
193 }
194 if (alpha >= 255)
195 {
196 active = false;
197 return;
198 }
199 }
201 }
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
float rotation
Definition Gore.cs:21
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.Gore.rotation, 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().