v1.3.2: fixed sheep not bundling their lifespan value

This commit is contained in:
Evan Debenham
2022-07-19 14:59:26 -04:00
parent 7beeec84f5
commit 571acc76ff

View File

@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.SheepSprite;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
public class Sheep extends NPC {
@@ -84,4 +85,18 @@ public class Sheep extends NPC {
}
return true;
}
private static final String LIFESPAN = "lifespan";
@Override
public void storeInBundle(Bundle bundle) {
super.storeInBundle(bundle);
bundle.put(LIFESPAN, lifespan);
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
lifespan = bundle.getInt(LIFESPAN);
}
}