Platformer
Platformer
|
Functions | |
def | getPath () |
Gets the current OS path. More... | |
def | osStartFile (file) |
Opens the given file based on the OS. | |
def | resetGlobalVars () |
Resets all global variables. | |
def | open () |
Opens the current level file. More... | |
def | save () |
Saves the current level file. More... | |
def | play () |
Plays the current level file. More... | |
def | levelOrderConfig () |
Gets the level order config file name. More... | |
def | changeLevelName () |
Changes the level name. More... | |
def | checkNameDups (name) |
Checks for duplicates of the current name in global objects. More... | |
def | createGameObject () |
Creates a new game object. More... | |
def | openGameObjectScript () |
Opens the currently selected game object's script file. More... | |
def | dupGameObject () |
Duplicates the currently selected game object. More... | |
def | selectFromCanvas (event) |
Selects an object based on the cursor position. More... | |
def | canvasMoveStart (event) |
Begins moving the canvas based on the mouse position. More... | |
def | canvasMouseMove (event) |
Moves the canvas based on the mouse position. More... | |
def | deleteSelected (key) |
Deletes the selected game object. More... | |
def | drawImage (path, obj) |
Draws the given image to the canvas. More... | |
def | redrawObjects () |
Redraws all game objects on the canvas. More... | |
def | layerUpFunc () |
Sets the currently selected game object to be layered one layer up. More... | |
def | layerDownFunc () |
Sets the currently selected game object to be layered one layer down. More... | |
def | refreshFields () |
Refreshes all of the fields. More... | |
def | refreshList () |
Refreshes the list of game objects. More... | |
def | selectInList (event) |
Selects a game object from the list. More... | |
def | setName () |
Sets the name via name field input. More... | |
def | setX () |
Sets the x coordinate via x field input. More... | |
def | setY () |
Sets the y coordinate via y field input. More... | |
def | setW () |
Sets the width via width field input. More... | |
def | setH () |
Sets the height via height field input. More... | |
def | setScriptName () |
Sets the script name via script field input. More... | |
def | setClassName () |
Sets the class name via class field input. More... | |
def | setSpriteName () |
Sets the sprite name via sprite field input. More... | |
def | setPermanentField () |
Sets the permanent field via permanent field input. More... | |
def | refreshAll () |
Refreshes everything. More... | |
Variables | |
list | globalObjs = [] |
The global object list. | |
selected = None | |
The current selected object. | |
string | curFileName = "temp.lvl" |
The current level file name. | |
list | spriteStore = [] |
Stores sprites for later. | |
app = gui("Eternal2DEditor", "1200x900") | |
Create the application window. | |
string | canvasTitle = "Scene View" |
The title of the main canvas. More... | |
canvas = app.addCanvas(canvasTitle, 0, 0) | |
Main canvas with images of GameObjects. More... | |
gain | |
string | nameField = "Name" |
The label for the namefield. More... | |
string | xField = "X" |
The label for the x coordinate field. More... | |
string | yField = "Y" |
The label for the y coordinate field. More... | |
string | wField = "W" |
The label for the width field. More... | |
string | hField = "H" |
The label for the height field. More... | |
string | permanentField = "Permanent" |
The label for the permanent field. More... | |
string | moduleNameField = "Module Name" |
The label for the module name field. More... | |
scriptEntry = app.addLabelEntry(moduleNameField, 4, 0, 2, 1) | |
string | classNameField = "Class Name" |
The label for the class name field. More... | |
string | spriteNameField = "Sprite Name" |
The label for the sprite name field. More... | |
string | layerUp = "Move Up" |
The label for the layer up name field. More... | |
string | layerDown = "Move Down" |
The label for the layer down name field. More... | |
string | listBox = "Scene Hierarchy" |
The label for the scene hierarchy. | |
lb = app.addListBox(listBox, [], 1, 0) | |
Side list with all objects. | |
Runs the python editor GUI interface. All python code relevant to the editor is found here.
def eternal2Deditor.canvasMouseMove | ( | event | ) |
Moves the canvas based on the mouse position.
def eternal2Deditor.canvasMoveStart | ( | event | ) |
Begins moving the canvas based on the mouse position.
def eternal2Deditor.changeLevelName | ( | ) |
Changes the level name.
def eternal2Deditor.checkNameDups | ( | name | ) |
Checks for duplicates of the current name in global objects.
Will append -dup if there is a duplicate.
def eternal2Deditor.createGameObject | ( | ) |
Creates a new game object.
def eternal2Deditor.deleteSelected | ( | key | ) |
Deletes the selected game object.
def eternal2Deditor.drawImage | ( | path, | |
obj | |||
) |
Draws the given image to the canvas.
def eternal2Deditor.dupGameObject | ( | ) |
Duplicates the currently selected game object.
def eternal2Deditor.getPath | ( | ) |
Gets the current OS path.
def eternal2Deditor.layerDownFunc | ( | ) |
Sets the currently selected game object to be layered one layer down.
def eternal2Deditor.layerUpFunc | ( | ) |
Sets the currently selected game object to be layered one layer up.
def eternal2Deditor.levelOrderConfig | ( | ) |
Gets the level order config file name.
def eternal2Deditor.open | ( | ) |
Opens the current level file.
def eternal2Deditor.openGameObjectScript | ( | ) |
Opens the currently selected game object's script file.
def eternal2Deditor.play | ( | ) |
Plays the current level file.
def eternal2Deditor.redrawObjects | ( | ) |
Redraws all game objects on the canvas.
def eternal2Deditor.refreshAll | ( | ) |
Refreshes everything.
def eternal2Deditor.refreshFields | ( | ) |
Refreshes all of the fields.
def eternal2Deditor.refreshList | ( | ) |
Refreshes the list of game objects.
def eternal2Deditor.save | ( | ) |
Saves the current level file.
def eternal2Deditor.selectFromCanvas | ( | event | ) |
Selects an object based on the cursor position.
def eternal2Deditor.selectInList | ( | event | ) |
Selects a game object from the list.
def eternal2Deditor.setClassName | ( | ) |
Sets the class name via class field input.
def eternal2Deditor.setH | ( | ) |
Sets the height via height field input.
def eternal2Deditor.setName | ( | ) |
Sets the name via name field input.
def eternal2Deditor.setPermanentField | ( | ) |
Sets the permanent field via permanent field input.
def eternal2Deditor.setScriptName | ( | ) |
Sets the script name via script field input.
def eternal2Deditor.setSpriteName | ( | ) |
Sets the sprite name via sprite field input.
def eternal2Deditor.setW | ( | ) |
Sets the width via width field input.
def eternal2Deditor.setX | ( | ) |
Sets the x coordinate via x field input.
def eternal2Deditor.setY | ( | ) |
Sets the y coordinate via y field input.
eternal2Deditor.canvas = app.addCanvas(canvasTitle, 0, 0) |
Main canvas with images of GameObjects.
string eternal2Deditor.canvasTitle = "Scene View" |
The title of the main canvas.
string eternal2Deditor.classNameField = "Class Name" |
The label for the class name field.
string eternal2Deditor.hField = "H" |
The label for the height field.
string eternal2Deditor.layerDown = "Move Down" |
The label for the layer down name field.
string eternal2Deditor.layerUp = "Move Up" |
The label for the layer up name field.
string eternal2Deditor.moduleNameField = "Module Name" |
The label for the module name field.
string eternal2Deditor.nameField = "Name" |
The label for the namefield.
string eternal2Deditor.permanentField = "Permanent" |
The label for the permanent field.
string eternal2Deditor.spriteNameField = "Sprite Name" |
The label for the sprite name field.
string eternal2Deditor.wField = "W" |
The label for the width field.
string eternal2Deditor.xField = "X" |
The label for the x coordinate field.
string eternal2Deditor.yField = "Y" |
The label for the y coordinate field.