|
|
@ -30,7 +30,7 @@ public class GameManager { |
|
|
|
if(time%5 == 0) { |
|
|
|
player.Move(); |
|
|
|
} |
|
|
|
if(time == 30) { |
|
|
|
if(time == 300) { |
|
|
|
spawnFruit(); |
|
|
|
} |
|
|
|
if (time == 600) { |
|
|
@ -52,7 +52,7 @@ public class GameManager { |
|
|
|
} |
|
|
|
|
|
|
|
public String randomFruit() { |
|
|
|
String fruitTypes[] = {"cherry","strawberry","orange"}; |
|
|
|
String fruitTypes[] = {"cherry","strawberry","orange","apple"}; |
|
|
|
int randomNumber = (int) (Math. random() * (fruitTypes.length)); |
|
|
|
return fruitTypes[randomNumber]; |
|
|
|
} |
|
|
|