Tag Info

New answers tagged

0

There are several possibilities. If your cube is user-controlled, it probably has something along the line of if(input.getKeyDown(...)) { //move } written either in your Update or your FixedUpdate. Simply test the progress and the userinput like this: if(!ProgressBar.isFull() && input.getKeyDown(...)) { //move } This also works with a ...


2

Well I'd like to comment on the question but I don't have 50 rep. Anyways: If we knew why you were doing this (specifically) then we might be able to help. To know when to stop moving the object, you'll need a condition as such: int maxProgress = 100; //the value at which the progress is full if (progress > maxProgress) //if it is full { var cube = ...



Top 50 recent answers are included