Class SpreadImage
java.lang.Object
me.deecaad.weaponmechanics.weapon.shoot.spread.SpreadImage
- All Implemented Interfaces:
me.deecaad.core.file.Serializer<SpreadImage>
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for serializerSpreadImage(Sprite sprite, double fovWidth, double fovHeight) -
Method Summary
Modifier and TypeMethodDescriptionintgetLocations(int amount) Gets a given number of random points (x, y) fromthis.pointsusing the value of that point as the chance for that point to be selected.intgetWidth()serialize(me.deecaad.core.file.SerializeData data) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
-
Constructor Details
-
SpreadImage
public SpreadImage()Default constructor for serializer -
SpreadImage
-
-
Method Details
-
getHeight
public int getHeight() -
getWidth
public int getWidth() -
getLocations
Gets a given number of random points (x, y) fromthis.pointsusing the value of that point as the chance for that point to be selected.If not enough points are found in the allowed number of checks, then random points are selected, not taking the point's value into account
- Parameters:
amount- Number of points to get- Returns:
- The found points
-
getLocation
-
getKeyword
- Specified by:
getKeywordin interfaceme.deecaad.core.file.Serializer<SpreadImage>
-
serialize
@NotNull public SpreadImage serialize(@NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Specified by:
serializein interfaceme.deecaad.core.file.Serializer<SpreadImage>- Throws:
me.deecaad.core.file.SerializerException
-