/// <summary> /// Gets the Tracker object bound to the specified tracker ID. /// </summary> public static Tracker GetTracker(TrackerID id) { if (!ms_initialized) { return(null); } for (int i = 0; i < ms_maxTrackers; i++) { if ((ms_Trackers[i] != null) && (ms_Trackers[i].ID == id)) { return(ms_Trackers[i]); } } return(null); }
private void PlaceTracker(TrackerID id) { Main.cursorOverride = 16; Main.LocalPlayer.mouseInterface = true; erasing = moving = false; if (Main.mouseLeft) { if (id == TrackerID.PathTracker) { var tracker = new PathTrackers(BetterZoom.RealMouseWorld); ModContent.GetInstance <BetterZoom>().trackerUI.Append(tracker); placing = null; } // Entity Tracker else if (id == TrackerID.EntityTracker) { TrackerUI.entityTracker = new EntityTracker(BetterZoom.RealMouseWorld); ModContent.GetInstance <BetterZoom>().trackerUI.Append(TrackerUI.entityTracker); Camera.ToggleLock(TrackerUI.entityTracker.TrackedEntity.position - new Vector2(Main.screenWidth / 2, Main.screenHeight / 2)); placing = null; } } }
/// <summary> /// Gets the Tracker object bound to the specified tracker ID. /// </summary> public static Tracker GetTracker(TrackerID id) { if (!ms_initialized) return null; for (int i = 0; i < ms_maxTrackers; i++) { if ((ms_Trackers[i] != null) && (ms_Trackers[i].ID == id)) { return ms_Trackers[i]; } } return null; }