Skip to content

Commit

Permalink
getNewStick() Rules Change
Browse files Browse the repository at this point in the history
  • Loading branch information
rainssong committed Oct 22, 2012
1 parent 764a378 commit c43e045
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Main.as
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ package
{
stick = new BrokenStick();
stick.x = Math.random() * (stage.stageWidth - stick.width) + stick.width / 2;
stick.y = stageStickArr[stageStickArr.length - 1].y + Math.random() * (distance-20) + 20;
stick.y = stageStickArr[stageStickArr.length - 1].y + Math.random() * (distance-30) + 20;
stageStickArr.push(stick);
sceneLayer.addChild(stick);
}
Expand All @@ -245,13 +245,14 @@ package

public function getNewStick():Stick
{
if (Math.random() < 0.5)
trace(score<9000?(9000-score)/10000:0.05)
if (Math.random() < (score<85000?(9000-score)/10000:0.05))
{
if (normalStickArr.length)
return normalStickArr.pop();
return new NormalStick();
}
else if (Math.random() < 0.7)
else if (Math.random() < 0.5)
{
if (movingStickArr.length)
return movingStickArr.pop();
Expand Down

0 comments on commit c43e045

Please sign in to comment.