Package com.starpoints.game.item
Class ItemColorBucket
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Item
-
- com.starpoints.game.item.ItemColorBucket
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class ItemColorBucket extends Item
Item, that colors the surrounding fields in the given color when used. Swirling points stop swirling, if colored. Available in red, blue and lightgray. When created without a defined color, a random color of these three will be chosen. If created with another color, it will be lightgray per default.- 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 ItemColorBucket()Creates a new colorbucket with a random color.ItemColorBucket(int c)Creates a new colorbucket with the given color.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddStateProperties(ThingState state, AnimationInfo animation)Adds properties necessary for color bucket painting.intgetItemRating()Returns an item value for ComputerFigures rating in the items category.booleanonBeUsed(Figure user, AnimationInfo animation)Colors the surrounding fields in the buckets color, and stops swirling on the points.-
Methods inherited from class com.starpoints.game.Item
affectsBlue, bePickedUp, beUsed, bombPlaced, createState, die, doSpecialUpdate, 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, onBePickedUp, 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, clearTexts, displayText, displayText, entersColor, equals, getColor, getEnergy, getEnergyMaxCount, getExplosionCounter, getField, getGame, getID, getImageName, 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
-
-
-
-
Constructor Detail
-
ItemColorBucket
public ItemColorBucket()
Creates a new colorbucket with a random color.
-
ItemColorBucket
public ItemColorBucket(int c)
Creates a new colorbucket with the given color. Must be lightGray, red or blue, otherwise a lightGray bucket is created.- Parameters:
c- The color.
-
-
Method Detail
-
addStateProperties
protected void addStateProperties(ThingState state, AnimationInfo animation)
Adds properties necessary for color bucket painting.- Overrides:
addStatePropertiesin classThing- Parameters:
state- The state to add properties to.animation- The current AnimationInfo.
-
getItemRating
public int getItemRating()
Returns an item value for ComputerFigures rating in the items category.- Overrides:
getItemRatingin classItem- Returns:
- 100.
-
onBeUsed
public boolean onBeUsed(Figure user, AnimationInfo animation)
Colors the surrounding fields in the buckets color, and stops swirling on the points.
-
-