Client LuaCsForBarotrauma
OrderTarget.cs
1
using
FarseerPhysics;
2
using
Microsoft.Xna.Framework;
3
4
namespace
Barotrauma
5
{
6
class
OrderTarget
:
ISpatialEntity
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
);
13
public
Submarine
Submarine
=>
Hull
?.
Submarine
;
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
}
Barotrauma.Entity.Submarine
Submarine Submarine
Definition:
Entity.cs:53
Barotrauma.Hull
Definition:
BarotraumaShared/SharedSource/Map/Hull.cs:115
Barotrauma.OrderTarget
Definition:
OrderTarget.cs:7
Barotrauma.OrderTarget.OrderTarget
OrderTarget(Vector2 position, Hull hull, bool creatingFromExistingData=false)
Definition:
OrderTarget.cs:15
Barotrauma.OrderTarget.WorldPosition
Vector2 WorldPosition
Definition:
OrderTarget.cs:11
Barotrauma.OrderTarget.SimPosition
Vector2 SimPosition
Definition:
OrderTarget.cs:12
Barotrauma.OrderTarget.Position
Vector2 Position
Definition:
OrderTarget.cs:8
Barotrauma.Submarine
Definition:
BarotraumaShared/SharedSource/Map/Submarine.cs:25
Barotrauma.Submarine.Position
override Vector2? Position
Definition:
BarotraumaShared/SharedSource/Map/Submarine.cs:186
Barotrauma.ISpatialEntity
Definition:
ISpatialEntity.cs:6
Barotrauma
Definition:
AchievementManager.cs:12
Barotrauma
BarotraumaShared
SharedSource
Map
OrderTarget.cs
Generated by
1.9.1