X-Git-Url: https://deadsoftware.ru/gitweb?p=cavedroid.git;a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2Fmobs%2FMob.java;h=f776ff5111ca0800b25c7ff127c969d182023cab;hp=241f01889b18df12d97c8e91f2037fe307a61736;hb=99a56427db13dd0ecd025e433a438b77245cb739;hpb=b651af0014451661858adf2c0fa3b4ecb4d3d4db diff --git a/core/src/ru/deadsoftware/cavecraft/game/mobs/Mob.java b/core/src/ru/deadsoftware/cavecraft/game/mobs/Mob.java index 241f018..f776ff5 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/mobs/Mob.java +++ b/core/src/ru/deadsoftware/cavecraft/game/mobs/Mob.java @@ -8,25 +8,33 @@ import java.io.Serializable; public abstract class Mob implements Serializable { - protected int anim, animSpeed = 6; + public boolean flyMode; private float width, height; private int dir; public Vector2 pos; public Vector2 mov; + private boolean dead; public boolean canJump; + protected int anim, animDelta = 6; - protected Mob(float x, float y, float width, float height, int dir) { + protected Mob(float x, float y, float width, float height, int dir, boolean player) { pos = new Vector2(x, y); + mov = new Vector2(0, 0); this.width = width; this.height = height; canJump = false; + flyMode = false; dead = false; this.dir = dir; } + protected Mob(float x, float y, float width, float height, int dir) { + this(x, y, width, height, dir, false); + } + public int getMapX() { return (int) (pos.x + (getWidth() / 2)) / 16; }