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

◆ DryadPortalFade()

void Terraria.Cinematics.DD2Film.DryadPortalFade ( FrameEventData evt)
inlineprivate

Definition at line 212 of file DD2Film.cs.

213 {
214 //IL_005e: Unknown result type (might be due to invalid IL or missing references)
215 //IL_0072: Unknown result type (might be due to invalid IL or missing references)
216 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
217 //IL_007d: Unknown result type (might be due to invalid IL or missing references)
218 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
219 //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
220 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
221 //IL_0133: Unknown result type (might be due to invalid IL or missing references)
222 //IL_0138: Unknown result type (might be due to invalid IL or missing references)
223 //IL_016d: Unknown result type (might be due to invalid IL or missing references)
224 //IL_01a9: Unknown result type (might be due to invalid IL or missing references)
225 //IL_01af: Unknown result type (might be due to invalid IL or missing references)
226 //IL_01d3: Unknown result type (might be due to invalid IL or missing references)
227 //IL_01df: Unknown result type (might be due to invalid IL or missing references)
228 //IL_01e4: Unknown result type (might be due to invalid IL or missing references)
229 //IL_01ea: Unknown result type (might be due to invalid IL or missing references)
230 //IL_01f5: Unknown result type (might be due to invalid IL or missing references)
231 //IL_01fa: Unknown result type (might be due to invalid IL or missing references)
232 //IL_01ff: Unknown result type (might be due to invalid IL or missing references)
233 if (_dryad == null || _portal == null)
234 {
235 return;
236 }
237 if (evt.IsFirstFrame)
238 {
240 }
241 float val = (float)(evt.Frame - 7) / (float)(evt.Duration - 7);
242 val = Math.Max(0f, val);
243 _dryad.color = new Color(Vector3.Lerp(Vector3.One, new Vector3(0.5f, 0f, 0.8f), val));
244 _dryad.Opacity = 1f - val;
245 _dryad.rotation += 0.05f * (val * 4f + 1f);
246 _dryad.scale = 1f - val;
247 if (_dryad.position.X < _portal.Right.X)
248 {
249 _dryad.velocity.X *= 0.95f;
250 _dryad.velocity.Y *= 0.55f;
251 }
252 int num = (int)(6f * val);
253 Vector2 size = _dryad.Size;
254 float num2 = ((Vector2)(ref size)).Length() / 2f;
255 num2 /= 20f;
256 for (int i = 0; i < num; i++)
257 {
258 if (Main.rand.Next(5) == 0)
259 {
260 Dust dust = Dust.NewDustDirect(_dryad.position, _dryad.width, _dryad.height, 27, _dryad.velocity.X * 1f, 0f, 100);
261 dust.scale = 0.55f;
262 dust.fadeIn = 0.7f;
263 dust.velocity *= 0.1f * num2;
264 dust.velocity += _dryad.velocity;
265 }
266 }
267 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 Center
Definition Entity.cs:70
Vector2 Size
Definition Entity.cs:221
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
Vector2 Right
Definition Entity.cs:104
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static readonly SoundStyle DD2_EtherianPortalDryadTouch
Definition SoundID.cs:187

References Terraria.Cinematics.DD2Film._dryad, Terraria.Cinematics.DD2Film._portal, Terraria.Entity.Center, Terraria.ID.SoundID.DD2_EtherianPortalDryadTouch, Terraria.Entity.height, Terraria.Dust.NewDustDirect(), Terraria.Audio.SoundEngine.PlaySound(), Terraria.Entity.position, Terraria.Main.rand, Terraria.Entity.Right, Terraria.Entity.Size, Terraria.Entity.velocity, and Terraria.Entity.width.

Referenced by Terraria.Cinematics.DD2Film.DD2Film().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: