public void Move(NavBeacon nav) { if (canNavigateToTarget) { NavBeacon newLoc = playerTarget.gameObject.GetComponent <NavBeacon>(); Debug.Log("Moving to: " + newLoc.Name); navModule.Move(newLoc); } }
public void TeleportToLocation(NavBeacon loc) { if (loc != null) { Debug.Log("Teleporting to: " + loc.Name); navRigidbody.position = loc.GetOrbitPosition(); currentLocation = loc; destination = null; } else { Debug.Log("ERROR: Teleport location set to null"); } }
public bool IsTargetNavigatable(Selector target) { NavBeacon nav = target.gameObject.GetComponent <NavBeacon>(); if (target == null) { return(false); } else if (nav != null && nav != navModule.CurrentLocation) { return(true); } else { return(false); } }