Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DroneCameraTracker.cs
Go to the documentation of this file.
2
4
6{
8
9 private int _lastTrackedType;
10
11 private bool _inUse;
12
13 public void Track(Projectile proj)
14 {
15 _trackedProjectile = proj;
17 }
18
19 public void Clear()
20 {
21 _trackedProjectile = null;
22 }
23
24 public void WorldClear()
25 {
27 _trackedProjectile = null;
28 _inUse = false;
29 }
30
32 {
34 {
35 Clear();
36 }
37 }
38
39 public bool IsInUse()
40 {
41 return _inUse;
42 }
43
44 public bool TryTracking(out Vector2 cameraPosition)
45 {
47 cameraPosition = default(Vector2);
48 if (_trackedProjectile == null)
49 {
50 _inUse = false;
51 return false;
52 }
53 cameraPosition = _trackedProjectile.Center;
54 _inUse = true;
55 return true;
56 }
57}
bool TryTracking(out Vector2 cameraPosition)
Vector2 Center
Definition Entity.cs:43
static int myPlayer
Definition Main.cs:1801
static Player LocalPlayer
Definition Main.cs:2829