File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 99import com .redomar .game .lib .Font ;
1010import com .redomar .game .lib .Name ;
1111import com .redomar .game .net .packets .Packet02Move ;
12+ import com .redomar .game .objects .Inventory ;
1213
1314public class Player extends Mob {
1415
@@ -86,6 +87,8 @@ public void render(Screen screen) {
8687 int walkingSpeed = 4 ;
8788 int flipTop = (numSteps >> walkingSpeed ) & 1 ;
8889 int flipBottom = (numSteps >> walkingSpeed ) & 1 ;
90+
91+ Inventory .activate ();
8992
9093 if (movingDir == 1 ) {
9194 xTile += 2 ;
Original file line number Diff line number Diff line change 1+ package com .redomar .game .objects ;
2+
3+ import com .redomar .game .Game ;
4+
5+ public class Inventory {
6+
7+ public static int x ;
8+ public static int y ;
9+ public static boolean open = false ;
10+
11+ public static void activate () {
12+ x = Game .getPlayer ().getX ();
13+ y = Game .getPlayer ().getY ();
14+
15+ if (Game .getLevel ().getTile (x >> 3 , y >> 3 ).getId () == 8 ){
16+ if (!open ){
17+ System .out .println ("Open" );
18+ open = true ;
19+ }
20+ }
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments