Ejemplo n.º 1
0
 public void FlagPickup(CTFNonVR player)
 {
     //if we're not already being held, become held
     if (!isBeingHeld)
     {
         isBeingHeld          = true;
         heldBy               = player;
         player.isHoldingFlag = true;
     }
 }
Ejemplo n.º 2
0
    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;
    }
Ejemplo n.º 3
0
    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;
    }