I want to increase Progression bar when we collect coins not distance. like in helix jump or tenkyu game. Can some please right a code for that i was trying for 3 days and it's not working for me
Progression bar is an object width, so you can use anything not just distance. if value 1 mean %100. function update(dt){ let path = this.scene().path(); let pathPos = path.pathPosition(); let value = pathPos/_distance; if(value > 1){ value = 1; } _bar.setPosition(-(1-value)*2.88,0,0); _bar.setScale(value,1,1); }
i want to increase it with points not distance. for example if i collect 1 coin progression increase 25% on 2nd coin 50% etc