1 package ru
.deadsoftware
.cavecraft
.game
.objects
;
3 import com
.badlogic
.gdx
.math
.Rectangle
;
7 private int x
, y
, w
, h
;
11 public boolean coll
, bg
, tp
, rb
;
13 public Block(int tex
, int hp
, int drop
) {
14 this(0, 0, 16, 16, tex
, hp
, drop
, true, false, false, false);
17 public Block(int tex
, int hp
, int drop
, boolean coll
, boolean bg
, boolean tp
) {
18 this(0, 0, 16, 16, tex
, hp
, drop
, coll
, bg
, tp
, false);
21 public Block(int tex
, int hp
, int drop
, boolean coll
, boolean bg
, boolean tp
, boolean rb
) {
22 this(0, 0, 16, 16, tex
, hp
, drop
, coll
, bg
, tp
, rb
);
25 public Block(int x
, int y
, int w
, int h
, int tex
, int hp
, int drop
, boolean coll
, boolean bg
, boolean tp
) {
26 this(x
, y
, w
, h
, tex
, hp
, drop
, coll
, bg
, tp
, false);
29 public Block(int x
, int y
, int w
, int h
, int tex
, int hp
, int drop
, boolean coll
, boolean bg
, boolean tp
, boolean rb
) {
51 public int getDrop() {
55 public Rectangle
getRect(int x
, int y
) {
58 return new Rectangle(x
+ this.x
, y
+ this.y
, w
, h
);
61 public boolean toJump() {
62 return (y
< 8 && coll
);