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

◆ GetPosition()

Vector2 Terraria.GameContent.UI.EmoteBubble.GetPosition ( out SpriteEffects effect)
inlineprivate

Definition at line 399 of file EmoteBubble.cs.

400 {
401 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
402 //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
403 //IL_00da: Unknown result type (might be due to invalid IL or missing references)
404 //IL_0100: Unknown result type (might be due to invalid IL or missing references)
405 //IL_0105: Unknown result type (might be due to invalid IL or missing references)
406 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
407 //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
408 //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
409 //IL_011a: Unknown result type (might be due to invalid IL or missing references)
410 //IL_0124: Unknown result type (might be due to invalid IL or missing references)
411 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
412 //IL_005c: Unknown result type (might be due to invalid IL or missing references)
413 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
414 //IL_0099: Unknown result type (might be due to invalid IL or missing references)
415 //IL_009e: Unknown result type (might be due to invalid IL or missing references)
416 //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
417 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
418 switch (anchor.type)
419 {
420 case WorldUIAnchor.AnchorType.Entity:
421 effect = (SpriteEffects)(anchor.entity.direction != -1);
422 return new Vector2(anchor.entity.Top.X, anchor.entity.VisualPosition.Y) + new Vector2((float)(-anchor.entity.direction * anchor.entity.width) * 0.75f, 2f) - Main.screenPosition;
423 case WorldUIAnchor.AnchorType.Pos:
424 effect = (SpriteEffects)0;
425 return anchor.pos - Main.screenPosition;
426 case WorldUIAnchor.AnchorType.Tile:
427 effect = (SpriteEffects)0;
428 return anchor.pos - Main.screenPosition + new Vector2(0f, (0f - anchor.size.Y) / 2f);
429 default:
430 effect = (SpriteEffects)0;
431 return new Vector2((float)Main.screenWidth, (float)Main.screenHeight) / 2f;
432 }
433 }
Vector2 Top
Definition Entity.cs:121
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
virtual Vector2 VisualPosition
Definition Entity.cs:67

References Terraria.GameContent.UI.EmoteBubble.anchor, Terraria.Entity.direction, Terraria.GameContent.UI.WorldUIAnchor.entity, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.GameContent.UI.WorldUIAnchor.size, Terraria.Entity.Top, Terraria.GameContent.UI.WorldUIAnchor.type, Terraria.Entity.VisualPosition, and Terraria.Entity.width.

Referenced by Terraria.GameContent.UI.EmoteBubble.Draw().

+ Here is the caller graph for this function: