diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/Pig.java b/core/src/ru/deadsoftware/cavedroid/game/mobs/Pig.java
index b2760c24624a7d0c402f4727f6101fd4bf23f561..5742a7c2599c9bd0fe2377a34047d51689aad6a0 100644 (file)
}
@Override
- public void ai(GameWorld gameWorld) {
+ public void ai(GameWorld gameWorld, float delta) {
if (MathUtils.randomBoolean(.0025f)) {
if (mVelocity.x != 0f) {
mVelocity.x = 0;
}
if (mVelocity.x != 0f) {
- mAnim += mAnimDelta;
+ mAnim += mAnimDelta * delta;
} else {
mAnim = 0;
}
}
@Override
- public void draw(SpriteBatch spriteBatch, float x, float y) {
+ public void draw(SpriteBatch spriteBatch, float x, float y, float delta) {
pigSprite[0][1].setRotation(getAnim());
pigSprite[1][1].setRotation(-getAnim());
//back legs