DEADSOFTWARE

Rename position -> pos
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / objects / Drop.java
index e967f880314480a1fd9b9d73c77aedea4729622f..fa60f6b60d67f9eec9385988f66da77537c7eed2 100644 (file)
@@ -8,18 +8,18 @@ import java.io.Serializable;
 public class Drop implements Serializable {
     private int id;
     public boolean pickedUp = false;
-    public Vector2 move, position;
+    public Vector2 move, pos;
 
     public Drop(float x, float y, int id) {
         this.id = id;
-        position = new Vector2(x, y);
+        pos = new Vector2(x, y);
         move = new Vector2(0, -1);
     }
 
     public void pickUpDrop(Player pl) {
-        for (int i = 0; i < pl.inventory.length; i++) {
-            if (pl.inventory[i] == 0 || pl.inventory[i] == id) {
-                pl.inventory[i] = id;
+        for (int i = 0; i < pl.inv.length; i++) {
+            if (pl.inv[i] == 0 || pl.inv[i] == id) {
+                pl.inv[i] = id;
                 pickedUp = true;
                 break;
             }
@@ -31,7 +31,7 @@ public class Drop implements Serializable {
     }
 
     public Rectangle getRect() {
-        return new Rectangle(position.x, position.y, 8, 8);
+        return new Rectangle(pos.x, pos.y, 8, 8);
     }
 
 }