We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ce077b commit 24408b4Copy full SHA for 24408b4
src/com/redomar/game/objects/Inventory.java
@@ -14,9 +14,21 @@ public static void activate() {
14
15
if(Game.getLevel().getTile(x >> 3, y >> 3).getId() == 8){
16
if(!open){
17
- System.out.println("Open");
+ System.out.println("Opened\nInside this Bag their is:"+inside());
18
open = true;
19
}
20
+ }else{
21
+ if(open){
22
+ open = false;
23
+ }
24
25
26
+
27
+ private static String inside(){
28
+ String items = " ";
29
+ for (Items item : Items.values()) {
30
+ items = items + item.toString() + ", ";
31
32
+ return items;
33
34
src/com/redomar/game/objects/Items.java
@@ -0,0 +1,9 @@
1
+package com.redomar.game.objects;
2
3
+public enum Items {
4
5
+ Stick,
6
+ Torch,
7
+ Sword,
8
+ Apple;
9
+}
0 commit comments