ActionState¶clear()¶Clears all added inputs.
requireRelease()¶Requires this action to have all inputs released before it can be triggered again.
elapsed¶inputs¶ActionStateisDisabled¶ActionState from checking inputisPressed¶isPressedThisFrame¶justPressed¶justPressedThisFrame¶justReleased¶justReleasedThisFrame¶DataStream¶__init__(arg2)¶| Parameters: | arg2 (int) – |
|---|
append(data)¶Adds data to the end of the buffer
| Parameters: | data (DataStream) – DataStream to add on to current buffer |
|---|
append(data, size)Adds size amount of data to the end of current buffer
| Parameters: |
|
|---|
begin()¶Reads a partition header and pushes it onto the stack
clear()¶Removes all data from the buffer
compress()¶Compresses the data in the buffer
converge()¶Exits a partition scope and moves to the outer partition
decompress()¶Decompresses the data in the buffer
diverge()¶Creates a partition in the datastream that is prefixed with a size header
end()¶Used to signal the stream that the current position should be at the end of a partition
partitionLength()¶Returns length of the top of the partition stack
| Return type: | int |
|---|
readBool()¶Ret a boolean from the buffer and returns it
| Return type: | bool |
|---|
readDict()¶Reads a Python dictionary from the buffer and returns it
| Return type: | dict |
|---|
readDouble()¶Read an double from the buffer and returns it
| Return type: | float |
|---|
readFloat()¶Read an float from the buffer and returns it
| Return type: | float |
|---|
readInt16()¶Read an integer from the buffer and returns it
| Return type: | int |
|---|
readInt32()¶Read an integer from the buffer and returns it
| Return type: | int |
|---|
readInt8()¶Read an integer from the buffer and returns it
| Return type: | int |
|---|
readNullTermString()¶Reads a null terminated string from the buffer and returns it
| Return type: | str |
|---|
readObject()¶Reads a Python obejct from the buffer and returns it
| Return type: | object |
|---|
readPixelVector()¶Read a PixelVector from the buffer and returns it
| Return type: | PixelVector |
|---|
readString()¶Read a string from the buffer and returns it
| Return type: | str |
|---|
readTileVector()¶Read a TileVector from the buffer and returns it
| Return type: | TileVector |
|---|
readUint16()¶Read an integer from the buffer and returns it
| Return type: | int |
|---|
readUint32()¶Read an integer from the buffer and returns it
| Return type: | int |
|---|
readUint64()¶Read an integer from the buffer and returns it
| Return type: | long |
|---|
readUint8()¶Read an integer from the buffer and returns it
| Return type: | int |
|---|
readWString()¶Read an wide character string from the buffer and returns it
| Return type: | unicode |
|---|
resize(arg2)¶Resizes the buffer to the specified size
| Parameters: | arg2 (int) – |
|---|
size()¶Returns the size of the data in the buffer
| Return type: | int |
|---|
skip()¶Skips over the remainder of the current partition
writeBool(data)¶Appends data to the end of the current buffer data
| Parameters: | data (bool) – Boolean to write to buffer |
|---|
writeColor(data)¶Appends data to the end of the current buffer data
| Parameters: | data (Color) – Color to write to buffer |
|---|
writeDict(data)¶Appends data to the end of the current buffer data
| Parameters: | data (dict) – Python dictionary to write to buffer |
|---|
writeDouble(data)¶Appends data to the end of the current buffer data
| Parameters: | data (float) – Double to write to buffer |
|---|
writeFloat(data)¶Appends data to the end of the current buffer data
| Parameters: | data (float) – Float to write to buffer |
|---|
writeInt16(data)¶Appends data to the end of the current buffer data
| Parameters: | data (int) – Int16 to write to buffer |
|---|
writeInt32(data)¶Appends data to the end of the current buffer data
| Parameters: | data (int) – Int32 to write to buffer |
|---|
writeInt8(data)¶Appends data to the end of the current buffer data
| Parameters: | data (int) – Int8 to write to buffer |
|---|
writeNullTermString(data)¶Appends a null terminated string to the end of the current buffer.
| Parameters: | data (str) – String to write to buffer |
|---|
writeObject(data)¶Appends data to the end of the current buffer data
| Parameters: | data (object) – Python Object to write to buffer |
|---|
writePixelRect(data)¶Appends data to the end of the current buffer data
| Parameters: | data (PixelRect) – PixelRect to write to buffer |
|---|
writePixelVector(data)¶Appends data to the end of the current buffer data
| Parameters: | data (PixelVector) – PixelVector to write to buffer |
|---|
writeRect(data)¶Appends data to the end of the current buffer data
| Parameters: | data (Rect) – Rect to write to buffer |
|---|
writeString(data)¶Appends data to the end of the current buffer data
| Parameters: | data (str) – String to write to buffer |
|---|
writeTileRect(data)¶Appends data to the end of the current buffer data
| Parameters: | data (TileRect) – TileRect to write to buffer |
|---|
writeTileVector(data)¶Appends data to the end of the current buffer data
| Parameters: | data (TileVector) – TileVector to write to buffer |
|---|
writeUint16(data)¶Appends data to the end of the current buffer data
| Parameters: | data (int) – Uint16 to write to buffer |
|---|
writeUint32(data)¶Appends data to the end of the current buffer data
| Parameters: | data (int) – Uint32 to write to buffer |
|---|
writeUint64(data)¶Appends data to the end of the current buffer data
| Parameters: | data (long) – Uint64 to write to buffer |
|---|
writeUint8(data)¶Appends data to the end of the current buffer data
| Parameters: | data (int) – Uint8 to write to buffer |
|---|
writeVector(data)¶Appends data to the end of the current buffer data
| Parameters: | data (Vector) – Vector to write to buffer |
|---|
writeVector3(data)¶Appends data to the end of the current buffer data
| Parameters: | data (Vector3) – Vector3 to write to buffer |
|---|
writeWString(data)¶Appends data to the end of the current buffer data
| Parameters: | data (unicode) – Wide String to write to buffer |
|---|
File¶backupCloudFiles(arg1, arg2)¶| Parameters: |
|
|---|
exists(filePath[, isCloudSave=True])¶| Parameters: |
|
|---|---|
| Return type: | bool |
getCharacters(configDirectory)¶| Parameters: | configDirectory (object) – |
|---|---|
| Return type: | StringList |
getValidPath(filePath)¶Formats a string to remove invalid characters from a string ([?\/:*<>|”])
| Parameters: | filePath (str) – Path to the file |
|---|---|
| Returns: | A formated string |
| Return type: | str |
getWorlds(configDirectory)¶| Parameters: | configDirectory (object) – |
|---|---|
| Return type: | StringList |
load(filePath, data[, isCloudSave=True])¶Appends the file data to the DataStream
| Parameters: |
|
|---|---|
| Returns: | Returns the file version number |
| Return type: | int |
open(filePath)¶Opens file at the path and reads into a buffer
| Parameters: | filePath (object) – Path to target file |
|---|---|
| Returns: | If the file is valid it is returned |
| Return type: | File |
remove(filePath[, isCloudSave=True])¶| Parameters: |
|
|---|
removeDirectory(directoryPath[, isCloudSave=True])¶| Parameters: |
|
|---|
save(filePath, data[, isCloudSave=True])¶Writes contents of data to the file at path
| Parameters: |
|
|---|
saveSimple(filePath, data[, isCloudSave=True])¶Writes contents of data to the file at path
| Parameters: |
|
|---|
usingSteamCloud()¶| Return type: | bool |
|---|
FileManager¶asyncRead(filePath, onComplete, isCreaFile[, useCompression=True[, isCloudSave=True]])¶Reads from a file using a new thread
| Parameters: |
|
|---|
asyncWrite(filePath, onComplete, stream[, useCompression=True[, isCloudSave=True]])¶Writes to a file using a new thread
| Parameters: |
|
|---|
FileOnCompleteHandler¶__call__(arg2, arg3)¶| Parameters: |
|
|---|
create([func=None])¶| Parameters: | func (object) – |
|---|---|
| Return type: | FileOnCompleteHandler |
JoyInput¶__init__(joyId, joyButton)¶| Parameters: |
|
|---|
__init__(joyId, joyAxis, axisDelta)| Parameters: |
|
|---|
axis¶delta¶position¶useAxis¶useButton¶MouseInput¶__eq__(arg2)¶| Parameters: | arg2 (MouseInput) – |
|---|---|
| Return type: | bool |
__init__(button)¶| Parameters: | button (Button) – |
|---|
GameInputList¶__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) – |
|---|
Input¶createAction()¶Returns a new ActionState
| Return type: | ActionState |
|---|
removeAction(actionState)¶Removes target ActionState from this Input
| Parameters: | actionState (ActionState) – The ActionState to be removed |
|---|
update(frameTime)¶Updates all ActionStates that this has created
| Parameters: | frameTime (int) – elapsed time for the frame |
|---|
actions¶Joystick¶getAxisPosition(joystick, axis)¶Get the current position of a joystick axis
| Parameters: |
|
|---|---|
| Returns: | Current position of the axis, in range [-100, 100] |
| Return type: | float |
getButtonCount(joystick)¶Return the number of buttons supported by a joystick.
| Parameters: | joystick (int) – Index of the joystick |
|---|---|
| Returns: | Number of buttons supported by the joystick, or 0 if joystick is not connected |
| Return type: | int |
getIdentification(joystick)¶Get the joystick information
| Parameters: | joystick (int) – Index of the joystick |
|---|---|
| Returns: | Structure containing joystick information. |
| Return type: | JoystickIdentification |
hasAxis(joystick, axis)¶Check if a joystick supports a given axis.
| Parameters: |
|
|---|---|
| Returns: | True if the joystick supports the axis, false otherwise |
| Return type: | bool |
isButtonPressed(joystick, button)¶Check if a joystick button is pressed.
| Parameters: |
|
|---|---|
| Returns: | True if the button is pressed, false otherwise |
| Return type: | bool |
isConnected(joystick)¶Check if a joystick is connected.
| Parameters: | joystick (int) – Index of joystick to check |
|---|---|
| Returns: | True if the joystick is connected, false otherwise |
| Return type: | bool |
update()¶Update the states of all joysticks.
Axis = <class 'siege.io.Axis'>AxisCount = 8ButtonCount = 32Count = 8PovX = siege.io.Axis.PovXPovY = siege.io.Axis.PovYR = siege.io.Axis.RU = siege.io.Axis.UV = siege.io.Axis.VX = siege.io.Axis.XY = siege.io.Axis.YZ = siege.io.Axis.ZKeyboard¶isKeyPressed(key)¶Check if a key is pressed
| Parameters: | key (Key) – The key to check |
|---|---|
| Returns: | True if key pressed, false otherwise |
| Return type: | bool |
A = siege.io.Key.AAdd = siege.io.Key.AddB = siege.io.Key.BBackSlash = siege.io.Key.BackSlashBackSpace = siege.io.Key.BackSpaceC = siege.io.Key.CComma = siege.io.Key.CommaD = siege.io.Key.DDash = siege.io.Key.DashDelete = siege.io.Key.DeleteDivide = siege.io.Key.DivideDown = siege.io.Key.DownE = siege.io.Key.EEnd = siege.io.Key.EndEqual = siege.io.Key.EqualEscape = siege.io.Key.EscapeF = siege.io.Key.FF1 = siege.io.Key.F1F10 = siege.io.Key.F10F11 = siege.io.Key.F11F12 = siege.io.Key.F12F13 = siege.io.Key.F13F14 = siege.io.Key.F14F15 = siege.io.Key.F15F2 = siege.io.Key.F2F3 = siege.io.Key.F3F4 = siege.io.Key.F4F5 = siege.io.Key.F5F6 = siege.io.Key.F6F7 = siege.io.Key.F7F8 = siege.io.Key.F8F9 = siege.io.Key.F9G = siege.io.Key.GH = siege.io.Key.HHome = siege.io.Key.HomeI = siege.io.Key.IInsert = siege.io.Key.InsertJ = siege.io.Key.JK = siege.io.Key.KKey = <class 'siege.io.Key'>KeyCount = siege.io.Key.KeyCountL = siege.io.Key.LLAlt = siege.io.Key.LAltLBracket = siege.io.Key.LBracketLControl = siege.io.Key.LControlLShift = siege.io.Key.LShiftLSystem = siege.io.Key.LSystemLeft = siege.io.Key.LeftM = siege.io.Key.MMenu = siege.io.Key.MenuMultiply = siege.io.Key.MultiplyN = siege.io.Key.NNum0 = siege.io.Key.Num0Num1 = siege.io.Key.Num1Num2 = siege.io.Key.Num2Num3 = siege.io.Key.Num3Num4 = siege.io.Key.Num4Num5 = siege.io.Key.Num5Num6 = siege.io.Key.Num6Num7 = siege.io.Key.Num7Num8 = siege.io.Key.Num8Num9 = siege.io.Key.Num9Numpad0 = siege.io.Key.Numpad0Numpad1 = siege.io.Key.Numpad1Numpad2 = siege.io.Key.Numpad2Numpad3 = siege.io.Key.Numpad3Numpad4 = siege.io.Key.Numpad4Numpad5 = siege.io.Key.Numpad5Numpad6 = siege.io.Key.Numpad6Numpad7 = siege.io.Key.Numpad7Numpad8 = siege.io.Key.Numpad8Numpad9 = siege.io.Key.Numpad9O = siege.io.Key.OP = siege.io.Key.PPageDown = siege.io.Key.PageDownPageUp = siege.io.Key.PageUpPause = siege.io.Key.PausePeriod = siege.io.Key.PeriodQ = siege.io.Key.QQuote = siege.io.Key.QuoteR = siege.io.Key.RRAlt = siege.io.Key.RAltRBracket = siege.io.Key.RBracketRControl = siege.io.Key.RControlRShift = siege.io.Key.RShiftRSystem = siege.io.Key.RSystemReturn = siege.io.Key.ReturnRight = siege.io.Key.RightS = siege.io.Key.SSemiColon = siege.io.Key.SemiColonSlash = siege.io.Key.SlashSpace = siege.io.Key.SpaceSubtract = siege.io.Key.SubtractT = siege.io.Key.TTab = siege.io.Key.TabTilde = siege.io.Key.TildeU = siege.io.Key.UUp = siege.io.Key.UpV = siege.io.Key.VW = siege.io.Key.WX = siege.io.Key.XY = siege.io.Key.YZ = siege.io.Key.ZMouse¶getPosition()¶Returns the current position of the mouse in desktop coordinates
| Return type: | sfTileVector |
|---|
getPosition(relativeTo)Get the current position of the mouse in window coordinate
| Parameters: | relativeTo (object) – Reference window |
|---|---|
| Returns: | Current position of the mouse |
| Return type: | sfTileVector |
isButtonPressed(button)¶Check if a mouse button is pressed
| Parameters: | button (Button) – Button to check |
|---|---|
| Returns: | True if the button if pressed, false otherwise |
| Return type: | bool |
setPosition(position)¶Set the current position of the mouse in desktop coordinates.
| Parameters: | position (sfTileVector) – New position of the mouse |
|---|
setPosition(position, relativeTo)This function sets the current position of the mouse cursor, relative to the given window.
| Parameters: |
|
|---|
Button = <class 'siege.io.Button'>ButtonCount = siege.io.Button.ButtonCountLeft = siege.io.Button.LeftMiddle = siege.io.Button.MiddleRight = siege.io.Button.RightXButton1 = siege.io.Button.XButton1XButton2 = siege.io.Button.XButton2