AssetCache
¶clean
()¶Clean up all redirections.
redirect
(path)¶Parameters: | path (object) – |
---|---|
Returns: | Returns the redirected path, if set. Otherwise returns the unchanged argument. |
Return type: | str |
redirection
(from, to)¶Set up a path redirection.
Parameters: |
|
---|
getFullPath
(relative, contentPath)¶Returns full path to asset.
Parameters: |
|
||
---|---|---|---|
Returns: |
|
||
Return type: | str |
ChunkRect
¶__init__
(x, y, width, height)¶Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(rect)Parameters: | rect (sfIntRect ) – |
---|
__init__
(rect)Parameters: | rect (PixelRect ) – |
---|
__init__
(rect)Parameters: | rect (SubtileRect ) – |
---|
__init__
(rect)Parameters: | rect (TileRect ) – |
---|
__init__
(rect)Parameters: | rect (SegmentRect ) – |
---|
__init__
(rect)Parameters: | rect (ChunkRect ) – |
---|
__init__
(rect)Parameters: | rect (RegionRect ) – |
---|
__init__
(rect)Parameters: | rect (Rect ) – |
---|
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
adjust
(x, y, width, height)¶Move by x,y then resize to width and height
Parameters: |
|
---|
asRegion
()¶Create a copy of this as a RegionRect
Return type: | RegionRect |
---|
asSegment
()¶Create a copy of this as a SegmentRect
Return type: | SegmentRect |
---|
asSubtile
()¶Create a copy of this as a SubtileRect
Return type: | SubtileRect |
---|
contains
(x, y[, loopWidth=0])¶Return true if x,y are within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if position is within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if provided rectangle is completely within the bounds of this otherwise false
Parameters: | |
---|---|
Return type: | bool |
intersects
(rect[, loopWidth=0])¶Returns true if rect is overlapping this rectangle, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect, intersection[, loopWidth=0])Returns true if rect is overlapping this rectangle, false otherwise. Saves overlapping coordinates to parameter intersection
Parameters: | |
---|---|
Return type: | bool |
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
move
(position)Adds position to x,y coordinates
Parameters: | position (ChunkVector ) – Value to be added to x,y coordinates |
---|
resize
(width, height)¶Expands width and height
Parameters: |
|
---|
fromCenter
(center, size)¶Create a new Rectangle from the center point.
Parameters: |
|
---|---|
Return type: |
bottom
¶height
¶left
¶right
¶size
¶top
¶width
¶x
¶y
¶ChunkVector
¶__add__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__cmp__
(vector)¶Compares this to another vector
Parameters: | vector (ChunkVector ) – The vector to compare against |
---|---|
Returns: | 0 if vectors are the same, -1 if arg is greater, 1 if arg is less than |
Return type: | int |
__div__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__div__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | ChunkVector |
__eq__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__iadd__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__idiv__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__imul__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__init__
(x, y)¶Parameters: |
|
---|
__init__
(x, y, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (sfTileVector ) – |
---|
__init__
(position, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__isub__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | ChunkVector |
__ne__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
__sub__
(arg2)¶Parameters: | arg2 (ChunkVector ) – |
---|---|
Return type: | object |
asChunk
()¶Create a copy of this as a ChunkVector
Return type: | ChunkVector |
---|
asPixel
()¶Create a copy of this as a PixelVector
Return type: | PixelVector |
---|
asRegion
()¶Create a copy of this as a RegionVector
Return type: | RegionVector |
---|
asSegment
()¶Create a copy of this as a SegmentVector
Return type: | SegmentVector |
---|
asSubtile
()¶Create a copy of this as a SubtileVector
Return type: | SubtileVector |
---|
asTile
()¶Create a copy of this as a TileVector
Return type: | TileVector |
---|
getAngle
([asDegrees=True])¶Return the angle or direction of this vector
Parameters: | asDegrees (bool) – If this is true return angle in degrees, else return angle in radians |
---|---|
Return type: | float |
getAngle
(position[, loopWidth=0[, asDegrees=True]])Return the angle or direction of position
Parameters: |
|
---|---|
Return type: | float |
getDirection
(position[, loopWidth=0])¶Returns a unit vector in the direction of position
Parameters: |
|
---|---|
Return type: |
getDirectionX
(x[, loopWidth=0])¶Returns direction towards x
Parameters: |
|
---|---|
Return type: | int |
getDirectionY
(y[, loopWidth=0])¶Returns direction towards y
Parameters: |
|
---|---|
Return type: | int |
getDistance
(position[, loopWidth=0])¶Returns the distance from position
Parameters: |
|
---|---|
Return type: | float |
isDefault
()¶Returns true if x==0 and y==0, false otherwise
Return type: | bool |
---|
loop
(loopWidth)¶Adds loopWidth to x if x < 0. Subtracts loopWidth from x if x >= loopWidth
Parameters: | loopWidth (int) – Amount to adjust x coordinate |
---|
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
shouldLoop
(loopWidth)¶Returns True if x < 0 or x >= loopWidth
Parameters: | loopWidth (int) – X coordinate for wrap around |
---|---|
Return type: | bool |
toSfml
()¶Create a copy of this as a sfTileVector
Return type: | sfTileVector |
---|
height
¶width
¶x
¶y
¶ColorList
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
append
(arg2)¶Parameters: | arg2 (object) – |
---|
extend
(arg2)¶Parameters: | arg2 (object) – |
---|
FloatList
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
append
(arg2)¶Parameters: | arg2 (object) – |
---|
extend
(arg2)¶Parameters: | arg2 (object) – |
---|
GameEvent
¶clear
()¶Removes all listeners
invoke
()¶Calls all listener functions
invoke
(arg)Calls all listener functions using 1 argument
Parameters: | arg (object) – The argument for the listeners |
---|
invoke
(arg1, arg2)Calls all listener functions using 2 argument
Parameters: |
|
---|
invoke
(arg1, arg2, arg3)Calls all listener functions using 3 argument
Parameters: |
|
---|
invoke
(arg1, arg2, arg3, arg4)Calls all listener functions using 4 argument
Parameters: |
|
---|
invoke
(arg1, arg2, arg3, arg4, arg5)Calls all listener functions using 5 argument
Parameters: |
|
---|
invoke
(arg1, arg2, arg3, arg4, arg5, arg6)Calls all listener functions using 6 argument
Parameters: |
|
---|
invoke
(arg1, arg2, arg3, arg4, arg5, arg6, arg7)Calls all listener functions using 7 argument
Parameters: |
|
---|
invoke
(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)Calls all listener functions using 8 argument
Parameters: |
|
---|
invokeExpand
(args, kargs)¶Calls all listener functions using arguments
Parameters: |
|
---|
listen
(listener)¶Adds a listener function to this event
Parameters: | listener (object) – The function to add |
---|
ObjectMap
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
PixelRect
¶__init__
(x, y, width, height)¶Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(rect)Parameters: | rect (sfIntRect ) – |
---|
__init__
(rect)Parameters: | rect (PixelRect ) – |
---|
__init__
(rect)Parameters: | rect (SubtileRect ) – |
---|
__init__
(rect)Parameters: | rect (TileRect ) – |
---|
__init__
(rect)Parameters: | rect (SegmentRect ) – |
---|
__init__
(rect)Parameters: | rect (ChunkRect ) – |
---|
__init__
(rect)Parameters: | rect (RegionRect ) – |
---|
__init__
(rect)Parameters: | rect (Rect ) – |
---|
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
adjust
(x, y, width, height)¶Move by x,y then resize to width and height
Parameters: |
|
---|
asRegion
()¶Create a copy of this as a RegionRect
Return type: | RegionRect |
---|
asSegment
()¶Create a copy of this as a SegmentRect
Return type: | SegmentRect |
---|
asSubtile
()¶Create a copy of this as a SubtileRect
Return type: | SubtileRect |
---|
contains
(x, y[, loopWidth=0])¶Return true if x,y are within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if position is within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if provided rectangle is completely within the bounds of this otherwise false
Parameters: | |
---|---|
Return type: | bool |
intersects
(rect[, loopWidth=0])¶Returns true if rect is overlapping this rectangle, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect, intersection[, loopWidth=0])Returns true if rect is overlapping this rectangle, false otherwise. Saves overlapping coordinates to parameter intersection
Parameters: | |
---|---|
Return type: | bool |
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
move
(position)Adds position to x,y coordinates
Parameters: | position (PixelVector ) – Value to be added to x,y coordinates |
---|
resize
(width, height)¶Expands width and height
Parameters: |
|
---|
fromCenter
(center, size)¶Create a new Rectangle from the center point.
Parameters: |
|
---|---|
Return type: |
bottom
¶height
¶left
¶right
¶size
¶top
¶width
¶x
¶y
¶PixelVector
¶__add__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__cmp__
(vector)¶Compares this to another vector
Parameters: | vector (PixelVector ) – The vector to compare against |
---|---|
Returns: | 0 if vectors are the same, -1 if arg is greater, 1 if arg is less than |
Return type: | int |
__div__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__div__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | PixelVector |
__eq__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__iadd__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__idiv__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__imul__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__init__
(x, y)¶Parameters: |
|
---|
__init__
(x, y, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (sfTileVector ) – |
---|
__init__
(position, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__isub__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | PixelVector |
__ne__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
__sub__
(arg2)¶Parameters: | arg2 (PixelVector ) – |
---|---|
Return type: | object |
asChunk
()¶Create a copy of this as a ChunkVector
Return type: | ChunkVector |
---|
asPixel
()¶Create a copy of this as a PixelVector
Return type: | PixelVector |
---|
asRegion
()¶Create a copy of this as a RegionVector
Return type: | RegionVector |
---|
asSegment
()¶Create a copy of this as a SegmentVector
Return type: | SegmentVector |
---|
asSubtile
()¶Create a copy of this as a SubtileVector
Return type: | SubtileVector |
---|
asTile
()¶Create a copy of this as a TileVector
Return type: | TileVector |
---|
getAngle
([asDegrees=True])¶Return the angle or direction of this vector
Parameters: | asDegrees (bool) – If this is true return angle in degrees, else return angle in radians |
---|---|
Return type: | float |
getAngle
(position[, loopWidth=0[, asDegrees=True]])Return the angle or direction of position
Parameters: |
|
---|---|
Return type: | float |
getDirection
(position[, loopWidth=0])¶Returns a unit vector in the direction of position
Parameters: |
|
---|---|
Return type: |
getDirectionX
(x[, loopWidth=0])¶Returns direction towards x
Parameters: |
|
---|---|
Return type: | int |
getDirectionY
(y[, loopWidth=0])¶Returns direction towards y
Parameters: |
|
---|---|
Return type: | int |
getDistance
(position[, loopWidth=0])¶Returns the distance from position
Parameters: |
|
---|---|
Return type: | float |
isDefault
()¶Returns true if x==0 and y==0, false otherwise
Return type: | bool |
---|
loop
(loopWidth)¶Adds loopWidth to x if x < 0. Subtracts loopWidth from x if x >= loopWidth
Parameters: | loopWidth (int) – Amount to adjust x coordinate |
---|
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
shouldLoop
(loopWidth)¶Returns True if x < 0 or x >= loopWidth
Parameters: | loopWidth (int) – X coordinate for wrap around |
---|---|
Return type: | bool |
toSfml
()¶Create a copy of this as a sfTileVector
Return type: | sfTileVector |
---|
height
¶width
¶x
¶y
¶Property
¶__init__
(arg2)¶Parameters: | arg2 (object) – |
---|
get
()¶Returns data
Return type: | object |
---|
read
(stream)¶Read this Property
from a stream and invokes its onChange event.
Parameters: | stream (DataStream ) – DataStream to read from. |
---|
read
(stream, args)Read this property from a stream and invokes its onChange event.
Parameters: |
|
---|
set
(arg2)¶Changes data to parameter
Parameters: | arg2 (object) – |
---|
set
(arg2, arg3)Changes data to parameter
Parameters: |
|
---|
write
(arg2)¶Write this Property
to a DataStream
.
Parameters: | arg2 (DataStream ) – |
---|
onChange
¶PropertyBool
¶__init__
(arg2)¶Parameters: | arg2 (bool) – |
---|
get
()¶Returns data
Return type: | bool |
---|
read
(stream)¶Read this Property
from a stream and invokes its onChange event.
Parameters: | stream (DataStream ) – DataStream to read from. |
---|
read
(stream, args)Read this property from a stream and invokes its onChange event.
Parameters: |
|
---|
set
(arg2)¶Changes data to parameter
Parameters: | arg2 (bool) – |
---|
set
(arg2, arg3)Changes data to parameter
Parameters: |
|
---|
write
(arg2)¶Write this Property
to a DataStream
.
Parameters: | arg2 (DataStream ) – |
---|
onChange
¶PropertyInt
¶__init__
(arg2)¶Parameters: | arg2 (int) – |
---|
get
()¶Returns data
Return type: | int |
---|
read
(stream)¶Read this Property
from a stream and invokes its onChange event.
Parameters: | stream (DataStream ) – DataStream to read from. |
---|
read
(stream, args)Read this property from a stream and invokes its onChange event.
Parameters: |
|
---|
set
(arg2)¶Changes data to parameter
Parameters: | arg2 (int) – |
---|
set
(arg2, arg3)Changes data to parameter
Parameters: |
|
---|
write
(arg2)¶Write this Property
to a DataStream
.
Parameters: | arg2 (DataStream ) – |
---|
onChange
¶PropertyStr
¶__init__
(arg2)¶Parameters: | arg2 (str) – |
---|
get
()¶Returns data
Return type: | str |
---|
read
(stream)¶Read this Property
from a stream and invokes its onChange event.
Parameters: | stream (DataStream ) – DataStream to read from. |
---|
read
(stream, args)Read this property from a stream and invokes its onChange event.
Parameters: |
|
---|
set
(arg2)¶Changes data to parameter
Parameters: | arg2 (str) – |
---|
set
(arg2, arg3)Changes data to parameter
Parameters: |
|
---|
write
(arg2)¶Write this Property
to a DataStream
.
Parameters: | arg2 (DataStream ) – |
---|
onChange
¶PropertyUint
¶__init__
(arg2)¶Parameters: | arg2 (int) – |
---|
get
()¶Returns data
Return type: | int |
---|
read
(stream)¶Read this Property
from a stream and invokes its onChange event.
Parameters: | stream (DataStream ) – DataStream to read from. |
---|
read
(stream, args)Read this property from a stream and invokes its onChange event.
Parameters: |
|
---|
set
(arg2)¶Changes data to parameter
Parameters: | arg2 (int) – |
---|
set
(arg2, arg3)Changes data to parameter
Parameters: |
|
---|
write
(arg2)¶Write this Property
to a DataStream
.
Parameters: | arg2 (DataStream ) – |
---|
onChange
¶PropertyUint8
¶__init__
(arg2)¶Parameters: | arg2 (int) – |
---|
get
()¶Returns data
Return type: | int |
---|
read
(stream)¶Read this Property
from a stream and invokes its onChange event.
Parameters: | stream (DataStream ) – DataStream to read from. |
---|
read
(stream, args)Read this property from a stream and invokes its onChange event.
Parameters: |
|
---|
set
(arg2)¶Changes data to parameter
Parameters: | arg2 (int) – |
---|
set
(arg2, arg3)Changes data to parameter
Parameters: |
|
---|
write
(arg2)¶Write this Property
to a DataStream
.
Parameters: | arg2 (DataStream ) – |
---|
onChange
¶Random
¶get
(min, max)¶Return random float within min and max
Parameters: |
|
---|---|
Return type: | float |
get
([max=2147483647])Returns an integer from 0 to max
Parameters: | max (int) – maximum value for range |
---|---|
Return type: | int |
get
(min, max)Return random integer within min and max
Parameters: |
|
---|---|
Return type: | int |
get
(list)Returns a random element from passed in list
Parameters: | list (list) – an element will be chosed at random from this |
---|---|
Return type: | object |
getBool
()¶Returns true or false randomly
Return type: | bool |
---|
getFloat
()¶Returns a random float from 0.0 to 1.0
Return type: | float |
---|
read
(stream)¶read current seed from stream
Parameters: | stream (DataStream ) – where to read from |
---|
seed
(seed)¶Sets the seed for generating numbers
Parameters: | seed (int) – set seed to this value |
---|
write
(stream)¶Write current seed to stream
Parameters: | stream (DataStream ) – where to write to |
---|
Range
¶__init__
(arg2)¶Parameters: | arg2 (object) – |
---|
__init__
(arg2, arg3)Parameters: |
|
---|
__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (object) – |
---|---|
Return type: | object |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | object |
getRandom
()¶Returns a random value within range
Return type: | object |
---|
end
¶max
¶min
¶start
¶RangeColor
¶__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (Color ) – |
---|---|
Return type: | Color |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (Color ) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | Color |
end
¶max
¶min
¶start
¶RangeFloat
¶__init__
(arg2)¶Parameters: | arg2 (float) – |
---|
__init__
(arg2, arg3)Parameters: |
|
---|
__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (float) – |
---|---|
Return type: | float |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (float) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | float |
getRandom
()¶Returns a random value within range
Return type: | float |
---|
end
¶max
¶min
¶start
¶RangeInt
¶__init__
(arg2)¶Parameters: | arg2 (int) – |
---|
__init__
(arg2, arg3)Parameters: |
|
---|
__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (int) – |
---|---|
Return type: | int |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (int) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | int |
getRandom
()¶Returns a random value within range
Return type: | int |
---|
end
¶max
¶min
¶start
¶RangeTileVector
¶__init__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|
__init__
(arg2, arg3)Parameters: |
|
---|
__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | TileVector |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | TileVector |
getRandom
()¶Returns a random value within range
Return type: | TileVector |
---|
end
¶max
¶min
¶start
¶RangeUint
¶__init__
(arg2)¶Parameters: | arg2 (int) – |
---|
__init__
(arg2, arg3)Parameters: |
|
---|
__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (int) – |
---|---|
Return type: | int |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (int) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | int |
getRandom
()¶Returns a random value within range
Return type: | int |
---|
end
¶max
¶min
¶start
¶RangeUint8
¶__init__
(arg2)¶Parameters: | arg2 (int) – |
---|
__init__
(arg2, arg3)Parameters: |
|
---|
__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (int) – |
---|---|
Return type: | int |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (int) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | int |
getRandom
()¶Returns a random value within range
Return type: | int |
---|
end
¶max
¶min
¶start
¶RangeVector
¶__str__
()¶Return type: | str |
---|
clamp
(arg2)¶Returns the value clamped within the range.
Parameters: | arg2 (Vector ) – |
---|---|
Return type: | Vector |
contains
(arg2)¶Returns true if value is within range, false otherwise
Parameters: | arg2 (Vector ) – |
---|---|
Return type: | bool |
get
(arg2)¶Returns a value from within range based on percentage passed in
Parameters: | arg2 (float) – |
---|---|
Return type: | Vector |
end
¶max
¶min
¶start
¶Rect
¶__init__
(x, y, width, height)¶Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(rect)Parameters: | rect (sfRect ) – |
---|
__init__
(rect)Parameters: | rect (PixelRect ) – |
---|
__init__
(rect)Parameters: | rect (SubtileRect ) – |
---|
__init__
(rect)Parameters: | rect (TileRect ) – |
---|
__init__
(rect)Parameters: | rect (SegmentRect ) – |
---|
__init__
(rect)Parameters: | rect (ChunkRect ) – |
---|
__init__
(rect)Parameters: | rect (RegionRect ) – |
---|
__init__
(rect)Parameters: | rect (Rect ) – |
---|
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
adjust
(x, y, width, height)¶Move by x,y then resize to width and height
Parameters: |
|
---|
asRegion
()¶Create a copy of this as a RegionRect
Return type: | RegionRect |
---|
asSegment
()¶Create a copy of this as a SegmentRect
Return type: | SegmentRect |
---|
asSubtile
()¶Create a copy of this as a SubtileRect
Return type: | SubtileRect |
---|
contains
(x, y[, loopWidth=0])¶Return true if x,y are within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if position is within this rectangle false otherwise
Parameters: | |
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if provided rectangle is completely within the bounds of this otherwise false
Parameters: | |
---|---|
Return type: | bool |
intersects
(rect[, loopWidth=0])¶Returns true if rect is overlapping this rectangle, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect, intersection[, loopWidth=0])Returns true if rect is overlapping this rectangle, false otherwise. Saves overlapping coordinates to parameter intersection
Parameters: | |
---|---|
Return type: | bool |
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
move
(position)Adds position to x,y coordinates
Parameters: | position (Vector ) – Value to be added to x,y coordinates |
---|
resize
(width, height)¶Expands width and height
Parameters: |
|
---|
fromCenter
(center, size)¶Create a new Rectangle from the center point.
Parameters: | |
---|---|
Return type: |
bottom
¶height
¶left
¶right
¶size
¶top
¶width
¶x
¶y
¶RegionRect
¶__eq__
(arg2)¶Parameters: | arg2 (RegionRect ) – |
---|---|
Return type: | object |
__init__
(x, y, width, height)¶Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(rect)Parameters: | rect (sfIntRect ) – |
---|
__init__
(rect)Parameters: | rect (PixelRect ) – |
---|
__init__
(rect)Parameters: | rect (SubtileRect ) – |
---|
__init__
(rect)Parameters: | rect (TileRect ) – |
---|
__init__
(rect)Parameters: | rect (SegmentRect ) – |
---|
__init__
(rect)Parameters: | rect (ChunkRect ) – |
---|
__init__
(rect)Parameters: | rect (RegionRect ) – |
---|
__init__
(rect)Parameters: | rect (Rect ) – |
---|
__ne__
(arg2)¶Parameters: | arg2 (RegionRect ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
adjust
(x, y, width, height)¶Move by x,y then resize to width and height
Parameters: |
|
---|
asRegion
()¶Create a copy of this as a RegionRect
Return type: | RegionRect |
---|
asSegment
()¶Create a copy of this as a SegmentRect
Return type: | SegmentRect |
---|
asSubtile
()¶Create a copy of this as a SubtileRect
Return type: | SubtileRect |
---|
contains
(x, y[, loopWidth=0])¶Return true if x,y are within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if position is within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if provided rectangle is completely within the bounds of this otherwise false
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect[, loopWidth=0])¶Returns true if rect is overlapping this rectangle, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect, intersection[, loopWidth=0])Returns true if rect is overlapping this rectangle, false otherwise. Saves overlapping coordinates to parameter intersection
Parameters: |
|
---|---|
Return type: | bool |
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
move
(position)Adds position to x,y coordinates
Parameters: | position (RegionVector ) – Value to be added to x,y coordinates |
---|
resize
(width, height)¶Expands width and height
Parameters: |
|
---|
fromCenter
(center, size)¶Create a new Rectangle from the center point.
Parameters: |
|
---|---|
Return type: |
bottom
¶height
¶left
¶right
¶size
¶top
¶width
¶x
¶y
¶RegionVector
¶__add__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__cmp__
(vector)¶Compares this to another vector
Parameters: | vector (RegionVector ) – The vector to compare against |
---|---|
Returns: | 0 if vectors are the same, -1 if arg is greater, 1 if arg is less than |
Return type: | int |
__div__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__div__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | RegionVector |
__eq__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__iadd__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__idiv__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__imul__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__init__
(x, y)¶Parameters: |
|
---|
__init__
(x, y, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (sfTileVector ) – |
---|
__init__
(position, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__isub__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | RegionVector |
__ne__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
__sub__
(arg2)¶Parameters: | arg2 (RegionVector ) – |
---|---|
Return type: | object |
asChunk
()¶Create a copy of this as a ChunkVector
Return type: | ChunkVector |
---|
asPixel
()¶Create a copy of this as a PixelVector
Return type: | PixelVector |
---|
asRegion
()¶Create a copy of this as a RegionVector
Return type: | RegionVector |
---|
asSegment
()¶Create a copy of this as a SegmentVector
Return type: | SegmentVector |
---|
asSubtile
()¶Create a copy of this as a SubtileVector
Return type: | SubtileVector |
---|
asTile
()¶Create a copy of this as a TileVector
Return type: | TileVector |
---|
getAngle
([asDegrees=True])¶Return the angle or direction of this vector
Parameters: | asDegrees (bool) – If this is true return angle in degrees, else return angle in radians |
---|---|
Return type: | float |
getAngle
(position[, loopWidth=0[, asDegrees=True]])Return the angle or direction of position
Parameters: |
|
---|---|
Return type: | float |
getDirection
(position[, loopWidth=0])¶Returns a unit vector in the direction of position
Parameters: |
|
---|---|
Return type: |
getDirectionX
(x[, loopWidth=0])¶Returns direction towards x
Parameters: |
|
---|---|
Return type: | int |
getDirectionY
(y[, loopWidth=0])¶Returns direction towards y
Parameters: |
|
---|---|
Return type: | int |
getDistance
(position[, loopWidth=0])¶Returns the distance from position
Parameters: |
|
---|---|
Return type: | float |
isDefault
()¶Returns true if x==0 and y==0, false otherwise
Return type: | bool |
---|
loop
(loopWidth)¶Adds loopWidth to x if x < 0. Subtracts loopWidth from x if x >= loopWidth
Parameters: | loopWidth (int) – Amount to adjust x coordinate |
---|
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
shouldLoop
(loopWidth)¶Returns True if x < 0 or x >= loopWidth
Parameters: | loopWidth (int) – X coordinate for wrap around |
---|---|
Return type: | bool |
toSfml
()¶Create a copy of this as a sfTileVector
Return type: | sfTileVector |
---|
height
¶width
¶x
¶y
¶SegmentRect
¶__eq__
(arg2)¶Parameters: | arg2 (SegmentRect ) – |
---|---|
Return type: | object |
__init__
(x, y, width, height)¶Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(rect)Parameters: | rect (sfIntRect ) – |
---|
__init__
(rect)Parameters: | rect (PixelRect ) – |
---|
__init__
(rect)Parameters: | rect (SubtileRect ) – |
---|
__init__
(rect)Parameters: | rect (TileRect ) – |
---|
__init__
(rect)Parameters: | rect (SegmentRect ) – |
---|
__init__
(rect)Parameters: | rect (ChunkRect ) – |
---|
__init__
(rect)Parameters: | rect (RegionRect ) – |
---|
__init__
(rect)Parameters: | rect (Rect ) – |
---|
__ne__
(arg2)¶Parameters: | arg2 (SegmentRect ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
adjust
(x, y, width, height)¶Move by x,y then resize to width and height
Parameters: |
|
---|
asRegion
()¶Create a copy of this as a RegionRect
Return type: | RegionRect |
---|
asSegment
()¶Create a copy of this as a SegmentRect
Return type: | SegmentRect |
---|
asSubtile
()¶Create a copy of this as a SubtileRect
Return type: | SubtileRect |
---|
contains
(x, y[, loopWidth=0])¶Return true if x,y are within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if position is within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if provided rectangle is completely within the bounds of this otherwise false
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect[, loopWidth=0])¶Returns true if rect is overlapping this rectangle, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect, intersection[, loopWidth=0])Returns true if rect is overlapping this rectangle, false otherwise. Saves overlapping coordinates to parameter intersection
Parameters: |
|
---|---|
Return type: | bool |
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
move
(position)Adds position to x,y coordinates
Parameters: | position (SegmentVector ) – Value to be added to x,y coordinates |
---|
resize
(width, height)¶Expands width and height
Parameters: |
|
---|
fromCenter
(center, size)¶Create a new Rectangle from the center point.
Parameters: |
|
---|---|
Return type: |
bottom
¶height
¶left
¶right
¶size
¶top
¶width
¶x
¶y
¶SegmentVector
¶__add__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__cmp__
(vector)¶Compares this to another vector
Parameters: | vector (SegmentVector ) – The vector to compare against |
---|---|
Returns: | 0 if vectors are the same, -1 if arg is greater, 1 if arg is less than |
Return type: | int |
__div__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__div__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | SegmentVector |
__eq__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__iadd__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__idiv__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__imul__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__init__
(x, y)¶Parameters: |
|
---|
__init__
(x, y, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (sfTileVector ) – |
---|
__init__
(position, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__isub__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | SegmentVector |
__ne__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
__sub__
(arg2)¶Parameters: | arg2 (SegmentVector ) – |
---|---|
Return type: | object |
asChunk
()¶Create a copy of this as a ChunkVector
Return type: | ChunkVector |
---|
asPixel
()¶Create a copy of this as a PixelVector
Return type: | PixelVector |
---|
asRegion
()¶Create a copy of this as a RegionVector
Return type: | RegionVector |
---|
asSegment
()¶Create a copy of this as a SegmentVector
Return type: | SegmentVector |
---|
asSubtile
()¶Create a copy of this as a SubtileVector
Return type: | SubtileVector |
---|
asTile
()¶Create a copy of this as a TileVector
Return type: | TileVector |
---|
getAngle
([asDegrees=True])¶Return the angle or direction of this vector
Parameters: | asDegrees (bool) – If this is true return angle in degrees, else return angle in radians |
---|---|
Return type: | float |
getAngle
(position[, loopWidth=0[, asDegrees=True]])Return the angle or direction of position
Parameters: |
|
---|---|
Return type: | float |
getDirection
(position[, loopWidth=0])¶Returns a unit vector in the direction of position
Parameters: |
|
---|---|
Return type: |
getDirectionX
(x[, loopWidth=0])¶Returns direction towards x
Parameters: |
|
---|---|
Return type: | int |
getDirectionY
(y[, loopWidth=0])¶Returns direction towards y
Parameters: |
|
---|---|
Return type: | int |
getDistance
(position[, loopWidth=0])¶Returns the distance from position
Parameters: |
|
---|---|
Return type: | float |
isDefault
()¶Returns true if x==0 and y==0, false otherwise
Return type: | bool |
---|
loop
(loopWidth)¶Adds loopWidth to x if x < 0. Subtracts loopWidth from x if x >= loopWidth
Parameters: | loopWidth (int) – Amount to adjust x coordinate |
---|
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
shouldLoop
(loopWidth)¶Returns True if x < 0 or x >= loopWidth
Parameters: | loopWidth (int) – X coordinate for wrap around |
---|---|
Return type: | bool |
toSfml
()¶Create a copy of this as a sfTileVector
Return type: | sfTileVector |
---|
height
¶width
¶x
¶y
¶SpatialHash
¶add
(obj)¶Adds object to spatial hash
Parameters: | obj (object) – object to store |
---|
clear
()¶Removes all objects and sections from spatial hash
clearSections
(sections)¶Removes specified sections from spatial hash
Parameters: | sections (SegmentList ) – List of sections to be removed |
---|
get
(sections)¶Returns a set of objects that are within sections
Parameters: | sections (SegmentList ) – List of sections to search |
---|---|
Return type: | object |
getAll
()¶Returns all objects in this spatial hash
Return type: | object |
---|
getNearby
(area)¶Returns a set of objects that are within area
Parameters: | area (Rect ) – The size of the area to search |
---|---|
Return type: | object |
getSection
(point)¶Returns a section that contains point
Parameters: | point (Vector ) – The x,y coordinates to search for |
---|---|
Return type: | int |
getSections
(rect)¶Returns a list of sections that contain rect
Parameters: | rect (Rect ) – Search for this area |
---|---|
Return type: | SegmentList |
has
(obj)¶Returns true if obj is present in this space, false otherwise
Parameters: | obj (object) – The object to search for |
---|---|
Return type: | bool |
remove
(obj)¶Removes object from spatial hash
Parameters: | obj (object) – this will be removed from spatial hash |
---|
StringList
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
append
(arg2)¶Parameters: | arg2 (object) – |
---|
extend
(arg2)¶Parameters: | arg2 (object) – |
---|
StringMap
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
StringSet
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__contains__
(arg2)Parameters: | arg2 (str) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
add
(arg2)¶Parameters: | arg2 (str) – |
---|
clear
()¶has
(arg2)¶Parameters: | arg2 (str) – |
---|---|
Return type: | bool |
remove
(arg2)¶Parameters: | arg2 (str) – |
---|
StringSetMap
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
SubtileRect
¶__eq__
(arg2)¶Parameters: | arg2 (SubtileRect ) – |
---|---|
Return type: | object |
__init__
(x, y, width, height)¶Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(rect)Parameters: | rect (sfIntRect ) – |
---|
__init__
(rect)Parameters: | rect (PixelRect ) – |
---|
__init__
(rect)Parameters: | rect (SubtileRect ) – |
---|
__init__
(rect)Parameters: | rect (TileRect ) – |
---|
__init__
(rect)Parameters: | rect (SegmentRect ) – |
---|
__init__
(rect)Parameters: | rect (ChunkRect ) – |
---|
__init__
(rect)Parameters: | rect (RegionRect ) – |
---|
__init__
(rect)Parameters: | rect (Rect ) – |
---|
__ne__
(arg2)¶Parameters: | arg2 (SubtileRect ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
adjust
(x, y, width, height)¶Move by x,y then resize to width and height
Parameters: |
|
---|
asRegion
()¶Create a copy of this as a RegionRect
Return type: | RegionRect |
---|
asSegment
()¶Create a copy of this as a SegmentRect
Return type: | SegmentRect |
---|
asSubtile
()¶Create a copy of this as a SubtileRect
Return type: | SubtileRect |
---|
contains
(x, y[, loopWidth=0])¶Return true if x,y are within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if position is within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if provided rectangle is completely within the bounds of this otherwise false
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect[, loopWidth=0])¶Returns true if rect is overlapping this rectangle, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect, intersection[, loopWidth=0])Returns true if rect is overlapping this rectangle, false otherwise. Saves overlapping coordinates to parameter intersection
Parameters: |
|
---|---|
Return type: | bool |
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
move
(position)Adds position to x,y coordinates
Parameters: | position (SubtileVector ) – Value to be added to x,y coordinates |
---|
resize
(width, height)¶Expands width and height
Parameters: |
|
---|
fromCenter
(center, size)¶Create a new Rectangle from the center point.
Parameters: |
|
---|---|
Return type: |
bottom
¶height
¶left
¶right
¶size
¶top
¶width
¶x
¶y
¶SubtileVector
¶__add__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__cmp__
(vector)¶Compares this to another vector
Parameters: | vector (SubtileVector ) – The vector to compare against |
---|---|
Returns: | 0 if vectors are the same, -1 if arg is greater, 1 if arg is less than |
Return type: | int |
__div__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__div__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | SubtileVector |
__eq__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__iadd__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__idiv__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__imul__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__init__
(x, y)¶Parameters: |
|
---|
__init__
(x, y, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (sfTileVector ) – |
---|
__init__
(position, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__isub__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | SubtileVector |
__ne__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
__sub__
(arg2)¶Parameters: | arg2 (SubtileVector ) – |
---|---|
Return type: | object |
asChunk
()¶Create a copy of this as a ChunkVector
Return type: | ChunkVector |
---|
asPixel
()¶Create a copy of this as a PixelVector
Return type: | PixelVector |
---|
asRegion
()¶Create a copy of this as a RegionVector
Return type: | RegionVector |
---|
asSegment
()¶Create a copy of this as a SegmentVector
Return type: | SegmentVector |
---|
asSubtile
()¶Create a copy of this as a SubtileVector
Return type: | SubtileVector |
---|
asTile
()¶Create a copy of this as a TileVector
Return type: | TileVector |
---|
getAngle
([asDegrees=True])¶Return the angle or direction of this vector
Parameters: | asDegrees (bool) – If this is true return angle in degrees, else return angle in radians |
---|---|
Return type: | float |
getAngle
(position[, loopWidth=0[, asDegrees=True]])Return the angle or direction of position
Parameters: |
|
---|---|
Return type: | float |
getDirection
(position[, loopWidth=0])¶Returns a unit vector in the direction of position
Parameters: |
|
---|---|
Return type: |
getDirectionX
(x[, loopWidth=0])¶Returns direction towards x
Parameters: |
|
---|---|
Return type: | int |
getDirectionY
(y[, loopWidth=0])¶Returns direction towards y
Parameters: |
|
---|---|
Return type: | int |
getDistance
(position[, loopWidth=0])¶Returns the distance from position
Parameters: |
|
---|---|
Return type: | float |
isDefault
()¶Returns true if x==0 and y==0, false otherwise
Return type: | bool |
---|
loop
(loopWidth)¶Adds loopWidth to x if x < 0. Subtracts loopWidth from x if x >= loopWidth
Parameters: | loopWidth (int) – Amount to adjust x coordinate |
---|
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
shouldLoop
(loopWidth)¶Returns True if x < 0 or x >= loopWidth
Parameters: | loopWidth (int) – X coordinate for wrap around |
---|---|
Return type: | bool |
toSfml
()¶Create a copy of this as a sfTileVector
Return type: | sfTileVector |
---|
height
¶width
¶x
¶y
¶TileRect
¶__init__
(x, y, width, height)¶Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(position, size)Parameters: |
|
---|
__init__
(rect)Parameters: | rect (sfIntRect ) – |
---|
__init__
(rect)Parameters: | rect (PixelRect ) – |
---|
__init__
(rect)Parameters: | rect (SubtileRect ) – |
---|
__init__
(rect)Parameters: | rect (TileRect ) – |
---|
__init__
(rect)Parameters: | rect (SegmentRect ) – |
---|
__init__
(rect)Parameters: | rect (ChunkRect ) – |
---|
__init__
(rect)Parameters: | rect (RegionRect ) – |
---|
__init__
(rect)Parameters: | rect (Rect ) – |
---|
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
adjust
(x, y, width, height)¶Move by x,y then resize to width and height
Parameters: |
|
---|
asRegion
()¶Create a copy of this as a RegionRect
Return type: | RegionRect |
---|
asSegment
()¶Create a copy of this as a SegmentRect
Return type: | SegmentRect |
---|
asSubtile
()¶Create a copy of this as a SubtileRect
Return type: | SubtileRect |
---|
contains
(x, y[, loopWidth=0])¶Return true if x,y are within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if position is within this rectangle false otherwise
Parameters: |
|
---|---|
Return type: | bool |
contains
(position[, loopWidth=0])Return true if provided rectangle is completely within the bounds of this otherwise false
Parameters: | |
---|---|
Return type: | bool |
intersects
(rect[, loopWidth=0])¶Returns true if rect is overlapping this rectangle, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
intersects
(rect, intersection[, loopWidth=0])Returns true if rect is overlapping this rectangle, false otherwise. Saves overlapping coordinates to parameter intersection
Parameters: | |
---|---|
Return type: | bool |
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
move
(position)Adds position to x,y coordinates
Parameters: | position (TileVector ) – Value to be added to x,y coordinates |
---|
resize
(width, height)¶Expands width and height
Parameters: |
|
---|
fromCenter
(center, size)¶Create a new Rectangle from the center point.
Parameters: |
|
---|---|
Return type: |
bottom
¶height
¶left
¶right
¶size
¶top
¶width
¶x
¶y
¶TileVector
¶__add__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__cmp__
(vector)¶Compares this to another vector
Parameters: | vector (TileVector ) – The vector to compare against |
---|---|
Returns: | 0 if vectors are the same, -1 if arg is greater, 1 if arg is less than |
Return type: | int |
__div__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__div__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | TileVector |
__eq__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__iadd__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__idiv__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__imul__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__init__
(x, y)¶Parameters: |
|
---|
__init__
(x, y, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (sfTileVector ) – |
---|
__init__
(position, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__isub__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | TileVector |
__ne__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
__sub__
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | object |
asChunk
()¶Create a copy of this as a ChunkVector
Return type: | ChunkVector |
---|
asPixel
()¶Create a copy of this as a PixelVector
Return type: | PixelVector |
---|
asRegion
()¶Create a copy of this as a RegionVector
Return type: | RegionVector |
---|
asSegment
()¶Create a copy of this as a SegmentVector
Return type: | SegmentVector |
---|
asSubtile
()¶Create a copy of this as a SubtileVector
Return type: | SubtileVector |
---|
asTile
()¶Create a copy of this as a TileVector
Return type: | TileVector |
---|
getAngle
([asDegrees=True])¶Return the angle or direction of this vector
Parameters: | asDegrees (bool) – If this is true return angle in degrees, else return angle in radians |
---|---|
Return type: | float |
getAngle
(position[, loopWidth=0[, asDegrees=True]])Return the angle or direction of position
Parameters: |
|
---|---|
Return type: | float |
getDirection
(position[, loopWidth=0])¶Returns a unit vector in the direction of position
Parameters: |
|
---|---|
Return type: |
getDirectionX
(x[, loopWidth=0])¶Returns direction towards x
Parameters: |
|
---|---|
Return type: | int |
getDirectionY
(y[, loopWidth=0])¶Returns direction towards y
Parameters: |
|
---|---|
Return type: | int |
getDistance
(position[, loopWidth=0])¶Returns the distance from position
Parameters: |
|
---|---|
Return type: | float |
isDefault
()¶Returns true if x==0 and y==0, false otherwise
Return type: | bool |
---|
loop
(loopWidth)¶Adds loopWidth to x if x < 0. Subtracts loopWidth from x if x >= loopWidth
Parameters: | loopWidth (int) – Amount to adjust x coordinate |
---|
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
shouldLoop
(loopWidth)¶Returns True if x < 0 or x >= loopWidth
Parameters: | loopWidth (int) – X coordinate for wrap around |
---|---|
Return type: | bool |
toSfml
()¶Create a copy of this as a sfTileVector
Return type: | sfTileVector |
---|
height
¶width
¶x
¶y
¶TileVectorList
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
append
(arg2)¶Parameters: | arg2 (object) – |
---|
extend
(arg2)¶Parameters: | arg2 (object) – |
---|
TileVectorSet
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__contains__
(arg2)Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
add
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|
clear
()¶has
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|---|
Return type: | bool |
remove
(arg2)¶Parameters: | arg2 (TileVector ) – |
---|
Timer
¶__init__
(time)¶Parameters: | time (int) – |
---|
expired
()¶Returns true if timer has no remaining time left, false otherwise
Return type: | bool |
---|
percentage
()¶Return percentage of remaining time
Return type: | float |
---|
remaining
()¶Returns the remaining time before timer expries
Return type: | int |
---|
reset
([time=0])¶Resets timer to a new amount
Parameters: | time (int) – Time in milliseconds until timer expires |
---|
restart
()¶stop
()¶Stops the timer.
Return type: | int |
---|
total
()¶Return original total from last reset
Return type: | int |
---|
update
(frameTime)¶Subtracts frameTime from remaining time
Parameters: | frameTime (int) – The amount of milliseconds to subtract from remaining time |
---|
Uint32List
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
append
(arg2)¶Parameters: | arg2 (object) – |
---|
extend
(arg2)¶Parameters: | arg2 (object) – |
---|
Uint32Set
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__contains__
(arg2)Parameters: | arg2 (int) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
add
(arg2)¶Parameters: | arg2 (int) – |
---|
clear
()¶has
(arg2)¶Parameters: | arg2 (int) – |
---|---|
Return type: | bool |
remove
(arg2)¶Parameters: | arg2 (int) – |
---|
Uint8List
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
append
(arg2)¶Parameters: | arg2 (object) – |
---|
extend
(arg2)¶Parameters: | arg2 (object) – |
---|
Vector
¶__cmp__
(vector)¶Compares this to another vector
Parameters: | vector (Vector ) – The vector to compare against |
---|---|
Returns: | 0 if vectors are the same, -1 if arg is greater, 1 if arg is less than |
Return type: | int |
__div__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | Vector |
__init__
(x, y)¶Parameters: |
|
---|
__init__
(x, y, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (sfVector ) – |
---|
__init__
(position, loopWidth)Parameters: |
|
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__init__
(position)Parameters: | position (PixelVector ) – |
---|
__init__
(position)Parameters: | position (SubtileVector ) – |
---|
__init__
(position)Parameters: | position (TileVector ) – |
---|
__init__
(position)Parameters: | position (SegmentVector ) – |
---|
__init__
(position)Parameters: | position (ChunkVector ) – |
---|
__init__
(position)Parameters: | position (RegionVector ) – |
---|
__init__
(position)Parameters: | position (Vector ) – |
---|
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | Vector |
__repr__
()¶A printable representation of this object.
Return type: | str |
---|
asChunk
()¶Create a copy of this as a ChunkVector
Return type: | ChunkVector |
---|
asPixel
()¶Create a copy of this as a PixelVector
Return type: | PixelVector |
---|
asRegion
()¶Create a copy of this as a RegionVector
Return type: | RegionVector |
---|
asSegment
()¶Create a copy of this as a SegmentVector
Return type: | SegmentVector |
---|
asSubtile
()¶Create a copy of this as a SubtileVector
Return type: | SubtileVector |
---|
asTile
()¶Create a copy of this as a TileVector
Return type: | TileVector |
---|
getAngle
([asDegrees=True])¶Return the angle or direction of this vector
Parameters: | asDegrees (bool) – If this is true return angle in degrees, else return angle in radians |
---|---|
Return type: | float |
getAngle
(position[, loopWidth=0[, asDegrees=True]])Return the angle or direction of position
Parameters: |
|
---|---|
Return type: | float |
getDirection
(position[, loopWidth=0])¶Returns a unit vector in the direction of position
Parameters: | |
---|---|
Return type: |
getDirectionX
(x[, loopWidth=0])¶Returns direction towards x
Parameters: |
|
---|---|
Return type: | int |
getDirectionY
(y[, loopWidth=0])¶Returns direction towards y
Parameters: |
|
---|---|
Return type: | int |
getDistance
(position[, loopWidth=0])¶Returns the distance from position
Parameters: | |
---|---|
Return type: | float |
isDefault
()¶Returns true if x==0 and y==0, false otherwise
Return type: | bool |
---|
loop
(loopWidth)¶Adds loopWidth to x if x < 0. Subtracts loopWidth from x if x >= loopWidth
Parameters: | loopWidth (float) – Amount to adjust x coordinate |
---|
move
(x, y)¶Adds arguments to current x,y values
Parameters: |
|
---|
shouldLoop
(loopWidth)¶Returns True if x < 0 or x >= loopWidth
Parameters: | loopWidth (float) – X coordinate for wrap around |
---|---|
Return type: | bool |
toSfml
()¶Create a copy of this as a sfTileVector
Return type: | sfVector |
---|
height
¶width
¶x
¶y
¶Vector3
¶__init__
(x, y, z)¶Parameters: |
|
---|
__init__
(position)Parameters: | position (sfVector3f ) – |
---|
__init__
(position)Parameters: | position (Vector3 ) – |
---|
__mul__
(arg2)Parameters: | arg2 (float) – |
---|---|
Return type: | Vector3 |
__repr__
()¶Return type: | str |
---|
asChunk
()¶Return type: | object |
---|
asRegion
()¶Return type: | object |
---|
asSegment
()¶Return type: | object |
---|
asSubtile
()¶Return type: | object |
---|
asTile
()¶Return type: | object |
---|
move
(x, y, z)¶Parameters: |
|
---|
toSfml
()¶Return type: | sfVector3f |
---|
x
¶y
¶z
¶Vector3List
¶__contains__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | bool |
__delitem__
(arg2)¶Parameters: | arg2 (object) – |
---|
__getitem__
(arg2)¶Parameters: | arg2 (object) – |
---|---|
Return type: | object |
__iter__
()¶Return type: | object |
---|
__len__
()¶Return type: | int |
---|
__setitem__
(arg2, arg3)¶Parameters: |
|
---|
append
(arg2)¶Parameters: | arg2 (object) – |
---|
extend
(arg2)¶Parameters: | arg2 (object) – |
---|
WeightedRandomGenerator
¶__call__
([useWorldRandom=False])¶Returns and index to one of the values randomly based on individual weight
Parameters: | useWorldRandom (bool) – if True then use :class:`World:class:`Random``() else use :class:`Random`() |
---|---|
Return type: | int |
__call__
(start, end[, useWorldRandom=False])Restricts value to range of min, max weight. Returns and index to one of the values randomly based on individual weight
Parameters: | |
---|---|
Return type: | int |
__init__
(arg2)¶Parameters: | arg2 (list) – |
---|
__init__
(arg2)Parameters: | arg2 (Uint32List ) – |
---|
findIndex
(target)¶Returns the index of the first weight that is greater than target
Parameters: | target (int) – minimum weight of desired index |
---|---|
Return type: | int |
hasWeights
()¶Returns true if initialization has occured
Return type: | bool |
---|
setWeights
(list)¶Intialize with a list of weights. Then adjust them to account for individual weight based off of total.
Parameters: | list (list) – individual values to be totalled |
---|
setWeights
(list)Intialize with a list of weights. Then adjust them to account for individual weight based off of total.
Parameters: | list (Uint32List ) – individual values to be totalled |
---|
totals
¶WorldRandom
¶get
(min, max)¶Return random float within min and max
Parameters: |
|
---|---|
Return type: | float |
get
([max=2147483647])Returns an integer from 0 to max
Parameters: | max (int) – maximum value for range |
---|---|
Return type: | int |
get
(min, max)Return random integer within min and max
Parameters: |
|
---|---|
Return type: | int |
get
(arg1)Parameters: | arg1 (list) – |
---|---|
Return type: | object |
getBool
()¶Returns true or false randomly
Return type: | bool |
---|
getFloat
()¶Returns a random float from 0.0 to 1.0
Return type: | float |
---|
read
(stream)¶read current seed from stream
Parameters: | stream (DataStream ) – where to read from |
---|
seed
(seed)¶Sets the seed for generating numbers
Parameters: | seed (int) – set seed to this value |
---|
write
(stream)¶Write current seed to stream
Parameters: | stream (DataStream ) – where to write to |
---|