EditorItem
Package: Libraries.Interface.Controls.Scenes.Items · Inherits from: Libraries.Interface.Item, Libraries.Language.Object
The Editor Item class represents an object in the Scene Editor that is in the scene and is being added, removed, or having its properties modified. The main purpose of this class is to get and set information about certain properties of an item in the scene such as those for physics calculations like mass and restitution. Properties relating to physics and others important to the scene like position and the texture of the object will be saved to the scene file.
Actions
GainedFocus(Libraries.Interface.Events.FocusEvent event)
Internal action so that when an object in the editor gains focus it also tells the SceneEditor class that this is the item that currently has the selection.
Parameters
GainedSelection()
Internal action so that when an object in the editor gains focus it also tells the SceneEditor class that this is the item that currently has the selection.
GetConstants()
Used Internally. This action returns the class that contains all the constants used by this object.
Returns
GetEditorFriction()
This action gets the coefficient of friction that is stored inside this editor property holder.
Returns
number: the coefficient of friction.
GetEditorMass()
This action returns the mass of the object set in the editor in kilograms.
Returns
number: the mass of the object.
GetEditorResponsiveness()
This action returns how physics (linear velocity, angular velocity, force, torque) will affect the object. There are three possible values to be returned: 0 indicates that the object is UNMOVABLE, which means no matter what forces or torques is applied to the object, the object will not move. 1 indicates that the object is NON_RESPONSIVE, which means that only setting the angular velocity and linear velocity of this object will affect how the object behaves. 2 indicates that the object is REPONSIVE, which means that this object will behave differently when you apply forces and torques to this object.
Returns
integer: Returns how physics will affect the object.
GetEditorRestitution()
This action returns how much energy that this object will loose after a collision.
Returns
number: the coefficient of restitution.
GetSceneEditor()
Returns the SceneEditor object that this item is a part of.
Returns
Libraries.Interface.Controls.Scenes.SceneEditor: The SceneEditor this item is attached to
IsEditorPhysicsEnabled()
This action returns true if physics is currently enabled for this item.
Returns
boolean: True if physics is enabled, false otherwise.
LostSelection()
Used Internally. This action returns the class that contains all the constants used by this object.
NotifyAccessibility(text message)
This action is used to send a message down to the Accessibility system so the user can notified of something that has changed or something the user may need to know to understand what is happening.
Parameters
messagetext
ResetScale()
ResetScale sets the scale of the object along each axis to the default which is usually 1. The scale of the object affects how large it is in the scene. So a scale of 2 on the x-axis means the object is twice as big on the x-axis than when normally sized.
SetEditorFriction(number friction)
This action sets the coefficient of friction that is stored inside this editor property holder.
Parameters
frictionnumber: the coefficient of friction.
SetEditorMass(number mass)
This action changes the mass of this object.
Parameters
massnumber: The mass of the object in kilograms.
SetEditorPhysicsEnabled(boolean enable)
This action sets whether or not this object will part of physics calculations that happen as the game runs. If phyics is not enabled then certain properties of the item will cause an error if the user attempts to view or change them. If physics is enabled than the object can be affected by force, and velocity calculations as the game runs.
Parameters
enableboolean: If true the physics enabled property will be set to true, false otherwise
SetEditorResponsiveness(integer responsive)
This action sets how physics (linear velocity, angular velocity, force, torque) will affect the object. There are three possible values to be set: 0 indicates that the object is UNMOVABLE, which means no matter what forces or torques is applied to the object, the object will not move. 1 indicates that the object is NON_RESPONSIVE, which means that only setting the angular velocity and linear velocity of this object will affect how the object behaves. 2 indicates that the object is REPONSIVE, which means that this object will behave differently when you apply forces and torques to this object.
Parameters
responsiveinteger: Integer representing how physics will affect the object.
SetEditorRestitution(number restitution)
This action sets how much energy that this object will loose after a collision. If you want the object to not loose any energy, then you can pass in 1.0. If you want the object to loose a lot of energy (meaning, they would probably move a lot slower after the collision), then you can pass in a 0.0. You can also use the values between 0 and 1.
Parameters
restitutionnumber: The coefficient of restitution.
SetSceneEditor(Libraries.Interface.Controls.Scenes.SceneEditor editor)
Sets the SceneEditor object that this item is a part of.
Parameters
editorLibraries.Interface.Controls.Scenes.SceneEditor: The SceneEditor this item is attached to
Inherited Actions
84 actions from Libraries.Interface.Item
- AddBehavior(Libraries.Interface.Behaviors.Behavior behavior)
- AddFocusListener(Libraries.Interface.Events.FocusListener listener)
- AddGestureListener(Libraries.Interface.Events.GestureListener listener)
- AddMouseListener(Libraries.Interface.Events.MouseListener listener)
- AddMouseMovementListener(Libraries.Interface.Events.MouseMovementListener listener)
- AddMouseWheelListener(Libraries.Interface.Events.MouseWheelListener listener)
- AddTouchListener(Libraries.Interface.Events.TouchListener listener)
- BeginCollision(Libraries.Interface.Item item)
- CancelBehaviors()
- Dispose()
- DisposeAll()
- DisposeChildren()
- Empty()
- EmptyAll()
- EmptyChildren()
- FinishCollision(Libraries.Interface.Item item)
- Focus()
- GetAccessibilityCode()
- GetAccessibilityRoleDescription()
- GetAccessibilityType()
- GetAccessibleParent()
- GetActiveDescendant()
- GetChildAsItem(integer index)
- GetDescription()
- GetFocusListeners()
- GetGestureListeners()
- GetGlobalX()
- GetGlobalY()
- GetGlobalZ()
- GetInputGroup()
- GetInputTable()
- GetItemCount()
- GetMouseListeners()
- GetMouseMovementListeners()
- GetMouseWheelListeners()
- GetName()
- GetNextFocus()
- GetPreviousFocus()
- GetPropertiesSize()
- GetProperty(text key)
- GetPropertyKeyIterator()
- GetTouchListeners()
- GetX()
- GetY()
- GetZ()
- HasProperties()
- HasProperty(text key)
- Hide()
- IsAcceptingMouseInput()
- IsAccessibleParent()
- IsFocusable()
- IsFocused()
- IsOnLayer()
- IsShowing()
- LostFocus(Libraries.Interface.Events.FocusEvent event)
- MoveX(number xAmount)
- MoveY(number yAmount)
- MoveZ(number zAmount)
- ProcessGestureEvent(Libraries.Interface.Events.GestureEvent event)
- ProcessMouseEvent(Libraries.Interface.Events.MouseEvent event)
- ProcessTouchEvent(Libraries.Interface.Events.TouchEvent event)
- RemoveFocusListener(Libraries.Interface.Events.FocusListener listener)
- RemoveGestureListener(Libraries.Interface.Events.GestureListener listener)
- RemoveMouseListener(Libraries.Interface.Events.MouseListener listener)
- RemoveMouseMovementListener(Libraries.Interface.Events.MouseMovementListener listener)
- RemoveMouseWheelListener(Libraries.Interface.Events.MouseWheelListener listener)
- RemoveTouchListener(Libraries.Interface.Events.TouchListener listener)
- SetAcceptsMouseInput(boolean accepts)
- SetAccessibilityCode(integer newAccessibilityCode)
- SetAccessibilityRoleDescription(text newRoleDescription)
- SetDescription(text newDescription)
- SetFocusable(boolean focus)
- SetInputGroup(text group)
- SetName(text newName)
- SetNextFocus(Libraries.Interface.Item next)
- SetPosition(number newX, number newY, number newZ)
- SetPreviousFocus(Libraries.Interface.Item previous)
- SetProperty(text key, Libraries.Data.Formats.JavaScriptObjectNotation value)
- SetX(number setX)
- SetY(number setY)
- SetZ(number setZ)
- Show()
- Update(number secondsSinceUpdate)
- UpdateAll(number secondsSinceUpdate)