public void Release() { if (state == GrapplableFSM.GRAPPLED) { state = GrapplableFSM.GRAPPLABLE; if (onReleased != null) { onReleased(); } } }
public void ForceStateChange(bool grapplable) { if (!grapplable) { if (state == GrapplableFSM.GRAPPLED) { PlayerManager.instance.forceRelease(); } state = GrapplableFSM.UNGRAPPLABLE; } else { state = GrapplableFSM.GRAPPLABLE; } }
public bool Grapple() { if (state == GrapplableFSM.GRAPPLABLE) { state = GrapplableFSM.GRAPPLED; if (onGrappled != null) { onGrappled(); } return(true); } else { return(false); } }