v1.3.2: fixed sheep not bundling their lifespan value
This commit is contained in:
+15
@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SheepSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.SheepSprite;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
public class Sheep extends NPC {
|
public class Sheep extends NPC {
|
||||||
@@ -84,4 +85,18 @@ public class Sheep extends NPC {
|
|||||||
}
|
}
|
||||||
return true;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user