Package com.starpoints.game.item
Class ItemExplosion
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Item
-
- com.starpoints.game.item.ItemExplosion
-
- All Implemented Interfaces:
ItemRammable,java.io.Serializable,java.lang.Cloneable
public class ItemExplosion extends Item implements ItemRammable
Item, that simply explodes and cannot be entered.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.starpoints.game.Item
affectsBlue, category, DEBUG, DEFAULT_ITEM_PAINTERCLASS, dieReason, isBomb, isWeapon, pickupClip, pickupText, pointBonus, useClip, user
-
Fields inherited from class com.starpoints.game.Thing
energy, energyFx, energyMaxSoundPlayed, energyModifications, explosionCounter, game, imageName, innerColor, invulnCount, isAffectedByBlack, isAffectedByGray, level, MAX_TEXTPAINT, maxEnergy, nextID, outerColor, p, shieldCount, status, text
-
-
Constructor Summary
Constructors Constructor Description ItemExplosion()Creates a new ItemExplosion.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbeRammed(Figure rammer, AnimationInfo animation)Returns false.protected voiddoSpecialUpdate(AnimationInfo animation)Updates this thing after each round.java.lang.StringgetImageName(AnimationInfo animation)Returns image name.intgetItemRating()Returns an item value for ComputerFigures rating in the items category.intgetRamPower()Gets the ram power.booleanonBePickedUp(Figure picker, AnimationInfo animation)Lets the collector explode.-
Methods inherited from class com.starpoints.game.Item
affectsBlue, bePickedUp, beUsed, bombPlaced, createState, die, entersColor, explodes, gainsEnergy, gainsPermanentItem, gainsSlots, getCategory, getDieReason, getDrawText, getItemRating, getMoveAnimationLength, getName, getPainterClassname, getPickUpClip, getPickupText, getPointBonus, getRamPower, getUseClip, getUser, heatChanges, is3DItem, isAffectedByColor, isAvailableInEditor, isBomb, isRammed, isRocketTarget, isStunned, isWeapon, killedEnemy, losesEnergy, losesItem, losesPermanentItem, lostPermanentItem, onBeforeDie, onBeHitByItem, onBeUsed, onDrop, onEnemyKilled, onHitItem, onLevelFinished, performFieldEffect, pickesUpBomb, pickesUpExplosive, pickesUpItem, pointsChange, pointSumChanges, removeAfterLevel, retrieveState, rocketStarted, setUser, startsHovering, staysOnColor, toString, updateExplodingStatus, updateThing, usesItem, visibilityChanges
-
Methods inherited from class com.starpoints.game.Thing
addEnergy, addShielding, addStateProperties, clearTexts, displayText, displayText, entersColor, equals, getColor, getEnergy, getEnergyMaxCount, getExplosionCounter, getField, getGame, getID, getInnerColor, getInvulnerableRounds, getLevel, getMaxEnergy, getNextID, getOuterColor, getPoint, getShadowColor, getShield, getStateObject, getStatus, getText, getTextColor, getTextPaintCount, getX, getY, hashCode, invulnerable, isAffectedByBlack, isAffectedByGray, isDestroyed, isExploding, isInvulnerable, isOK, isShowingEnergyFx, onExplode, removeEnergy, retrieveState, setEnergy, setEnergyMaxCount, setGame, setMaxEnergy, setPoint, setStatus, staysOnColor, stepText, updateEnergy
-
-
-
-
Method Detail
-
getItemRating
public int getItemRating()
Returns an item value for ComputerFigures rating in the items category.- Overrides:
getItemRatingin classItem- Returns:
- energy * -1000.
-
getImageName
public java.lang.String getImageName(AnimationInfo animation)
Returns image name.- Overrides:
getImageNamein classThing- Parameters:
animation- The AnimationInfo.- Returns:
- "explosion9"
-
onBePickedUp
public boolean onBePickedUp(Figure picker, AnimationInfo animation)
Lets the collector explode.- Overrides:
onBePickedUpin classItem- Parameters:
picker- The (stupid) collector of the explosion.animation- The AnimationInfo.- Returns:
- false - cannot be carried around.
-
doSpecialUpdate
protected void doSpecialUpdate(AnimationInfo animation)
Updates this thing after each round. If this thing is destroyed, its status is set back to exploding.- Overrides:
doSpecialUpdatein classItem- Parameters:
animation- The AnimationInfo.
-
getRamPower
public int getRamPower()
Gets the ram power.- Specified by:
getRamPowerin interfaceItemRammable- Returns:
- 1000.
-
beRammed
public boolean beRammed(Figure rammer, AnimationInfo animation)
Returns false.- Specified by:
beRammedin interfaceItemRammable- Parameters:
rammer- The rammeranimation- the AnimationInfo.- Returns:
- true, if the figure can enter the items point.
-
-