|
@ -28,9 +28,16 @@ public class GameManager { |
|
|
if(time%5 == 0) { |
|
|
if(time%5 == 0) { |
|
|
player.Move(); |
|
|
player.Move(); |
|
|
} |
|
|
} |
|
|
|
|
|
if(time == 300) { |
|
|
|
|
|
spawnCherry(); |
|
|
|
|
|
} |
|
|
time++; |
|
|
time++; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void spawnCherry() { |
|
|
|
|
|
map.GetCell(map.playerSpawn).type = "cherry"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void ProcessInput(char inputChar) { |
|
|
public void ProcessInput(char inputChar) { |
|
|
if(inputChar == 27) { |
|
|
if(inputChar == 27) { |
|
|
//todo: escape key pauses game |
|
|
//todo: escape key pauses game |
|
|