public void FlagPickup(CTFNonVR player) { //if we're not already being held, become held if (!isBeingHeld) { isBeingHeld = true; heldBy = player; player.isHoldingFlag = true; } }
public void FlagDrop() { //we're nolonger being held, seeing as we've been dropped isBeingHeld = false; heldBy.isHoldingFlag = false; heldBy = null; //place ourselves directly down from where we are Physics.Raycast(transform.position, Vector3.down, out RaycastHit hitInfo); transform.position = hitInfo.point; }
public void FlagCapture() { //we're nolonger being held, seeing as we've been captured isBeingHeld = false; heldBy.isHoldingFlag = false; heldBy = null; //reset the flag's position and rotation transform.position = defaultPosition; transform.rotation = defaultRotation; }