Client LuaCsForBarotrauma
OrderTarget.cs
1 using FarseerPhysics;
2 using Microsoft.Xna.Framework;
3 
4 namespace Barotrauma
5 {
7  {
8  public Vector2 Position { get; private set; }
9  public Hull Hull { get; private set; }
10 
11  public Vector2 WorldPosition => Submarine == null ? Position : Position + Submarine.Position;
12  public Vector2 SimPosition => ConvertUnits.ToSimUnits(Position);
14 
15  public OrderTarget(Vector2 position, Hull hull, bool creatingFromExistingData = false)
16  {
17  if (!creatingFromExistingData && hull?.Submarine != null) { position -= hull.Submarine.Position; }
18  Position = position;
19  Hull = hull;
20  }
21  }
22 }
Submarine Submarine
Definition: Entity.cs:53
OrderTarget(Vector2 position, Hull hull, bool creatingFromExistingData=false)
Definition: OrderTarget.cs:15