Package com.starpoints.game
Class Skin
- java.lang.Object
-
- com.starpoints.game.Skin
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class Skin extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
Class for storing initial player information like money, shielding, ram power, overlay image etc.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int[]
DEFAULT_LIGHTS_INDEX
Fitting light indices for default color skins.static Skin[]
DEFAULT_SKINS
Standard skins with different colors, no additional shieldings and ram power, 5 slots, 200/250 energy, no money.static int
LIGHTS_KEY
static java.lang.String[]
LIGHTS_OVERLAYS
Overlay images for lights.static int
MAX_DEFAULT_SKIN
Max index of default skin.static int
PAINT_KEY
static int
STICKER_KEY
static java.lang.String[]
STICKER_OVERLAYS
Overlay images for paintings.static int
TYPE_KEY
static java.lang.String[]
TYPE_OVERLAYS
Overlay images for player add-ons.static Skin[]
TYPE_SKINS
Skins for different initial shield, ram and money settings.
-
Constructor Summary
Constructors Constructor Description Skin(java.lang.String imageName, int innerColor, int outerColor, int ramPower, int explosionShielding, int ramShielding, int rocketShielding, int heatShielding, int slots, int initialEnergy, int initialMaxEnergy, int coolnessFactor, int initialMoney)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Returns a clone.int
getCoolnessFactor()
static Skin
getDefaultSkin(int index)
Gets the default skin for the player with the given index.Handicap
getHandicap()
java.lang.String
getImageName()
int
getInitialEnergy()
int
getInitialExplosionShielding()
int
getInitialHeatShielding()
int
getInitialMaxEnergy()
int
getInitialMoney()
int
getInitialRamPower()
int
getInitialRamShielding()
int
getInitialRocketShielding()
int
getInitialSlots()
int
getInnerColor()
int
getOuterColor()
java.lang.String
getOverlayImage(int key)
java.util.List<java.lang.String>
getOverlayImages()
Returns a list of overlay images in ascwending key order (for sequential overlay painting).void
putOverlayImage(int key, java.lang.String image)
void
removeOverlayImage(int key)
void
setCoolnessFactor(int coolnessFactor)
void
setHandicap(Handicap handicap)
void
setImageName(java.lang.String imageName)
void
setInitialEnergy(int initialEnergy)
void
setInitialExplosionShielding(int initialExplosionShielding)
void
setInitialHeatShielding(int initialHeatShielding)
void
setInitialMaxEnergy(int initialMaxEnergy)
void
setInitialMoney(int initialMoney)
void
setInitialRamPower(int initialRamPower)
void
setInitialRamShielding(int initialRamShielding)
void
setInitialRocketShielding(int initialRocketShielding)
void
setInitialSlots(int initialSlots)
void
setInnerColor(int innerColor)
void
setOuterColor(int outerColor)
-
-
-
Field Detail
-
LIGHTS_KEY
public static int LIGHTS_KEY
-
STICKER_KEY
public static int STICKER_KEY
-
TYPE_KEY
public static int TYPE_KEY
-
PAINT_KEY
public static int PAINT_KEY
-
DEFAULT_SKINS
public static final Skin[] DEFAULT_SKINS
Standard skins with different colors, no additional shieldings and ram power, 5 slots, 200/250 energy, no money.
-
TYPE_SKINS
public static final Skin[] TYPE_SKINS
Skins for different initial shield, ram and money settings.
-
TYPE_OVERLAYS
public static final java.lang.String[] TYPE_OVERLAYS
Overlay images for player add-ons.
-
STICKER_OVERLAYS
public static final java.lang.String[] STICKER_OVERLAYS
Overlay images for paintings.
-
LIGHTS_OVERLAYS
public static final java.lang.String[] LIGHTS_OVERLAYS
Overlay images for lights.
-
DEFAULT_LIGHTS_INDEX
public static final int[] DEFAULT_LIGHTS_INDEX
Fitting light indices for default color skins.
-
MAX_DEFAULT_SKIN
public static final int MAX_DEFAULT_SKIN
Max index of default skin.- See Also:
- Constant Field Values
-
-
Method Detail
-
getImageName
public java.lang.String getImageName()
-
setImageName
public void setImageName(java.lang.String imageName)
-
getInnerColor
public int getInnerColor()
-
setInnerColor
public void setInnerColor(int innerColor)
-
getOuterColor
public int getOuterColor()
-
setOuterColor
public void setOuterColor(int outerColor)
-
getInitialExplosionShielding
public int getInitialExplosionShielding()
-
setInitialExplosionShielding
public void setInitialExplosionShielding(int initialExplosionShielding)
-
getInitialRamShielding
public int getInitialRamShielding()
-
setInitialRamShielding
public void setInitialRamShielding(int initialRamShielding)
-
getInitialRocketShielding
public int getInitialRocketShielding()
-
setInitialRocketShielding
public void setInitialRocketShielding(int initialRocketShielding)
-
getInitialHeatShielding
public int getInitialHeatShielding()
-
setInitialHeatShielding
public void setInitialHeatShielding(int initialHeatShielding)
-
getInitialSlots
public int getInitialSlots()
-
setInitialSlots
public void setInitialSlots(int initialSlots)
-
getInitialRamPower
public int getInitialRamPower()
-
setInitialRamPower
public void setInitialRamPower(int initialRamPower)
-
getInitialEnergy
public int getInitialEnergy()
-
setInitialEnergy
public void setInitialEnergy(int initialEnergy)
-
getInitialMaxEnergy
public int getInitialMaxEnergy()
-
setInitialMaxEnergy
public void setInitialMaxEnergy(int initialMaxEnergy)
-
getCoolnessFactor
public int getCoolnessFactor()
-
setCoolnessFactor
public void setCoolnessFactor(int coolnessFactor)
-
getHandicap
public Handicap getHandicap()
-
setHandicap
public void setHandicap(Handicap handicap)
-
getOverlayImages
public java.util.List<java.lang.String> getOverlayImages()
Returns a list of overlay images in ascwending key order (for sequential overlay painting).- Returns:
- List of overlay images.
-
putOverlayImage
public void putOverlayImage(int key, java.lang.String image)
-
getOverlayImage
public java.lang.String getOverlayImage(int key)
-
removeOverlayImage
public void removeOverlayImage(int key)
-
getDefaultSkin
public static Skin getDefaultSkin(int index)
Gets the default skin for the player with the given index.- Parameters:
index
- The player index- Returns:
- The default skin.
-
clone
public java.lang.Object clone()
Returns a clone.- Overrides:
clone
in classjava.lang.Object
-
getInitialMoney
public int getInitialMoney()
- Returns:
- the initialMoney
-
setInitialMoney
public void setInitialMoney(int initialMoney)
- Parameters:
initialMoney
- the initialMoney to set
-
-