PortalTool
Description
The tool used to edit the portals. Use Wall.AddPortal() instead if you want to create portals directly.
Accessed by Global.Editor.Tools["PortalTool"]
.
Properties
Texture | Texture |
bool | Closed |
bool | Freestanding |
Range | Rotation |
bool | Flip |
bool | foundLocation |
GridMenu | textureMenu |
Methods
void | SetFreestanding ( bool enabled ) |
void | FindBestLocation ( Vector2 position ) |
void | ChangeTexture ( Texture texture, String property ) |
Property Descriptions
- Texture Texture:
Modified in conjunction with calling ChangeTexture() by the UI to set the next portal's texture.
- bool Closed:
Toggles whether or not the Portal blocks light.
- bool Freestanding:
Toggles whether or not the Portals created will be freestanding. Must also set the SetFreestanding() method if not using the UI Controls.
- bool Flip:
Flips the orientation of new Portals.
- bool foundLocation:
Wether or not the latest user input location for the tool contains a possible location spot for a new Portal.
- GridMenu textureMenu:
The menu that selects textures for this tool. DO NOT MODIFY.
Method Descriptions
- void SetFreestanding ( bool enabled ):
Toggles whether or not the Portals created will be freestanding. Must also set the Freestanding property if not using the UI Controls.
- void FindBestLocation ( Vector2 position ):
Finds the best location based on the proximity to the parameter position and sets the preview Portal to that position. The Portal creation data cannot cross C#<->GDScript language barrier unfortunately.
- void ChangeTexture ( Texture texture, String property ):
Called in conjunction with modifying Texture by the UI to set the next portal's texture.