static public int closePath(IntPtr l) { try { GoSpline self = (GoSpline)checkSelf(l); self.closePath(); return(0); } catch (Exception e) { return(error(l, e)); } }
private void closeRoute() { // we will use the GoSpline class to handle the dirtywork of closing the path var path = new GoSpline(_target.nodes, _target.forceStraightLinePath); path.closePath(); _target.nodes = path.nodes; GUI.changed = true; }
private void OnTriggerExit(Collider other) { var doorMove = new Vector3[] { new Vector3( 0, 0, 0 ), new Vector3( 0, 0, -0.25f), new Vector3( 0, 0, -0.5f)}; var path = new GoSpline( doorMove ); path.closePath(); GoTweenConfig doorConfig = new GoTweenConfig().positionPath(path,true).onComplete(DoorCleanup); doorConfig.setEaseType(GoEaseType.QuadInOut); Go.to( transform, openTime, doorConfig); }
public override void DoClickToAct() { var doorMove = new Vector3[] { new Vector3( 0, 0, 0 ), new Vector3( 0, 0, 0.25f), new Vector3( 0, 0, 0.5f)}; var path = new GoSpline( doorMove ); path.closePath(); GoTweenConfig doorConfig = new GoTweenConfig().positionPath(path,true).onComplete(DoorCleanup); doorConfig.setEaseType(GoEaseType.QuadInOut); Go.to( transform, openTime, doorConfig); }
private void OnTriggerExit(Collider other) { var doorMove = new Vector3[] { new Vector3(0, 0, 0), new Vector3(0, 0, 0.25f), new Vector3(0, 0, 0.5f) }; var path = new GoSpline(doorMove); path.closePath(); GoTweenConfig doorConfig = new GoTweenConfig().positionPath(path, true).onComplete(DoorCleanup); doorConfig.setEaseType(GoEaseType.QuadInOut); Go.to(transform, openTime, doorConfig); }
public override void DoClickToAct() { var doorMove = new Vector3[] { new Vector3(0, 0, 0), new Vector3(0, 0, -0.25f), new Vector3(0, 0, -0.5f) }; var path = new GoSpline(doorMove); path.closePath(); GoTweenConfig doorConfig = new GoTweenConfig().positionPath(path, true).onComplete(DoorCleanup); doorConfig.setEaseType(GoEaseType.QuadInOut); Go.to(transform, openTime, doorConfig); }
public void Push() { var pushPoints = new Vector3[] { new Vector3(0, 0, 0), buttonPushVector }; var path = new GoSpline(pushPoints); path.closePath(); GoTweenConfig pushConfig = new GoTweenConfig().positionPath(path, true); pushConfig.setEaseType(GoEaseType.QuadInOut); Go.to(transform, timeForButtonPush, pushConfig); }
public override void DoClickToAct() { var jumpPath = new Vector3[] { new Vector3( 0, 0, 0 ), new Vector3( -jumpLength/2, jumpHeight, 0), new Vector3( -jumpLength, 0, 0 )}; var path = new GoSpline( jumpPath ); path.closePath(); //GoTweenConfig stepConfig = new GoTweenConfig().positionPath(path,true).onComplete(OnJumpComplete); GoTweenConfig jumpConfig = new GoTweenConfig().positionPath(path,true).onComplete(JumpGapCleanup); jumpConfig.setEaseType(GoEaseType.QuadInOut); Go.to( player.transform, jumpGapTime, jumpConfig); Invoke ("PlayLandAudio", timeTillPlayLand); }
public override void DoClickToAct() { var jumpPath = new Vector3[] { new Vector3(0, 0, 0), new Vector3(-jumpLength / 2, jumpHeight, 0), new Vector3(-jumpLength, 0, 0) }; var path = new GoSpline(jumpPath); path.closePath(); //GoTweenConfig stepConfig = new GoTweenConfig().positionPath(path,true).onComplete(OnJumpComplete); GoTweenConfig jumpConfig = new GoTweenConfig().positionPath(path, true).onComplete(JumpGapCleanup); jumpConfig.setEaseType(GoEaseType.QuadInOut); Go.to(player.transform, jumpGapTime, jumpConfig); Invoke("PlayLandAudio", timeTillPlayLand); }
private GoSpline CreateSpline() { List<Vector3> points = new List<Vector3> ( Points ); if ( !UseControlPoints || ClosePath ) { points.Insert ( 0, points[0] ); points.Add ( points[points.Count - 1] ); } GoSpline spline = new GoSpline ( points, UseStraightLines ); if ( ClosePath ) spline.closePath (); return spline; }
public override void DoClickToAct() { if (isJumping == false) { //Bob isJumping = true; //clickToInstruction.renderer.enabled = false; var headPopPoints = new Vector3[] { new Vector3(0, 0, 0), new Vector3(0, 1, 0), new Vector3(0, 0, 0) }; var path = new GoSpline(headPopPoints); path.closePath(); GoTweenConfig stepConfig = new GoTweenConfig().positionPath(path, true).onComplete(OnJumpComplete); stepConfig.setEaseType(GoEaseType.QuadOut); Go.to(player.transform, jumpTime, stepConfig); } }
public override void DoClickToAct() { if(isJumping == false) { //Bob isJumping = true; //clickToInstruction.renderer.enabled = false; var headPopPoints = new Vector3[] { new Vector3( 0, 0, 0 ), new Vector3( 0, 1, 0), new Vector3( 0, 0, 0 )}; var path = new GoSpline( headPopPoints ); path.closePath(); GoTweenConfig stepConfig = new GoTweenConfig().positionPath(path,true).onComplete(OnJumpComplete); stepConfig.setEaseType(GoEaseType.QuadOut); Go.to( player.transform, jumpTime, stepConfig); } }
private void DoClickToStep() { if (isStepping == false) { if (Input.GetMouseButtonDown(0)) { float xdistance = -(stepLength * Mathf.Cos(horizontalAngle)); float zdistance = (stepLength * Mathf.Sin(horizontalAngle)); //Bob isStepping = true; clickToInstruction.GetComponent <Renderer>().enabled = false; var headPopPoints = new Vector3[] { new Vector3(0, 0, 0), new Vector3(xdistance / 2, stepBobHeight, zdistance / 2), new Vector3(xdistance, heightChange, zdistance) }; var path = new GoSpline(headPopPoints); path.closePath(); GoTweenConfig stepConfig = new GoTweenConfig().positionPath(path, true).onComplete(OnStepComplete); stepConfig.setEaseType(GoEaseType.QuadInOut); Go.to(transform, stepTime, stepConfig); } } }
private void DoClickToStep() { if(isStepping == false) { if(Input.GetMouseButtonDown(0)) { float xdistance = -(stepLength*Mathf.Cos(horizontalAngle)); float zdistance = (stepLength*Mathf.Sin(horizontalAngle)); //Bob isStepping = true; clickToInstruction.GetComponent<Renderer>().enabled = false; var headPopPoints = new Vector3[] { new Vector3( 0, 0, 0 ), new Vector3( xdistance/2, stepBobHeight, zdistance/2 ), new Vector3( xdistance, heightChange, zdistance )}; var path = new GoSpline( headPopPoints ); path.closePath(); GoTweenConfig stepConfig = new GoTweenConfig().positionPath(path,true).onComplete(OnStepComplete); stepConfig.setEaseType(GoEaseType.QuadInOut); Go.to( transform, stepTime, stepConfig); } } }
private void closeRoute() { // we will use the GoSpline class to handle the dirtywork of closing the path var path = new GoSpline( _target.nodes, _target.forceStraightLinePath ); path.closePath(); _target.nodes = path.nodes; GUI.changed = true; }