|
|
@ -4,6 +4,7 @@ public class Cell { |
|
|
|
public Vector2 pos; |
|
|
|
public String type; |
|
|
|
public final Map map; |
|
|
|
public GameManager gameManager; |
|
|
|
|
|
|
|
public Cell(Vector2 pos, String type, Map map) { |
|
|
|
this.pos = pos; |
|
|
@ -17,11 +18,15 @@ public class Cell { |
|
|
|
} |
|
|
|
|
|
|
|
public void triggerPill() { |
|
|
|
//todo: code |
|
|
|
this.type = "empty"; |
|
|
|
gameManager.score += 100; |
|
|
|
int timeStopPillEffect = gameManager.time + 200; |
|
|
|
gameManager.ghostIsEdible = true; |
|
|
|
} |
|
|
|
|
|
|
|
public void triggerFruit() { |
|
|
|
//todo: code |
|
|
|
this.type = "empty"; |
|
|
|
map.gameManager.score += 505; |
|
|
|
} |
|
|
|
|
|
|
|
public void triggerItem() { |
|
|
@ -35,8 +40,7 @@ public class Cell { |
|
|
|
triggerFruit(); |
|
|
|
} |
|
|
|
else { |
|
|
|
System.out.println("cell contains no item!"); |
|
|
|
//System.out.println("cell contains no item!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |