5ff36e476584f6eaa9ac34733d76ba550df0d9ea
1 package ru
.deadsoftware
.cavecraft
.game
.objects
;
3 import com
.badlogic
.gdx
.math
.Rectangle
;
4 import com
.badlogic
.gdx
.math
.Vector2
;
6 import java
.io
.Serializable
;
8 public class Drop
implements Serializable
{
10 public Vector2 move
, position
;
12 public static void pickUpDrop(Player pl
, int id
) {
13 for (int i
= 0; i
< pl
.inventory
.length
; i
++) {
14 if (pl
.inventory
[i
] == 0) {
21 public Drop(float x
, float y
, int id
) {
23 position
= new Vector2(x
, y
);
24 move
= new Vector2(0, -1);
31 public Rectangle
getRect() {
32 return new Rectangle(position
.x
, position
.y
, 8, 8);