User Manual: Entities
From Color Infection Wiki
Contents |
What are Components
Components are some predefined prototypes to be instanced in level designing.
What is an Entity
An instance of a component is called an entity.
Basic Properties of Entities
All entities have these common basic properties:
- X: the x coordinate of an entity (m).
- Y: the y coordinate of an entity (m).
- Flipped: flipped? "Flipped" means "flipped by local Y axis".
- Angle: the rotation of an entity (degrees). The angle for some trigger components are always zero. If an entity is not flipped, its rotation is the rotation in world, otherwise, "its world rotation" = π - "its rotation."
- Scale: scale
- Alpha: the transparency of an entity. It is useless for trigger components and camera.
- Visible: visible or not. It is useless for trigger components and camera.
- Enabled: enabled or not. Currently, this property is only valid for event handler trigger entities.
Use Entity as a Task
Every entity can be viewed as a task. A task has 3 possible values: finished, failed and unfinished. (Please don't confuse this concept with the level status)
The meaning of the task value is totally determined by you, the designer. You can view the task value as a triple property of an entity. Using this property cleverly will make the designing easier.
About Enabled Property
Currently, the Enabled property of entities is only valid for event handler trigger entities. If an event handler's Enabled property is false, then it will not response the corresponding events.
Entity Brothers
Before introduce how to select entities, we should know what is Entity Brothers.
When there are more than one entities are selected, you can make them as Entity Brothers by select the Make Brothes command on the main command bar. In simulating, brother entities will be glued together (no relative translation and rotation between them).
Create Entities
To create an entity creation process, you should first select a create command on the left component create comands panel.
Currently, there are 3 entity creation process styles:
- mouse press-drag-release style (also called Drag Creation Style) is used in creating rectangles, circles, slider joints, distance joints, spring joints, dummy joints, bombs, gravity controllers, texts and text buttons.
- mouse multi-click style (called Multi-Click Creation Style in short) is used in creating polygons and polylines.
- mouse click style (also called Place Creation Style) is used in creating other components.
Select Entities
There are 2 selection modes, one is the default mode, the other is called Cookie Mode. You can turn on/off the cookie mode by select the Toggle Cookie Mode command on the main command bar.
Under the default selection mode:
- when you press mouse on an entity, the entity will be selected. At the same time, the selection statuses of old selected entities will be cleared.
- when an entity is selected, all its brothers will be also selected automatically.
Under cookie selection mode:
- when you release mouse on an entity, the entity will toggle selection status. The selection statuses other entities will NOT changed.
- when an entity is selected, all its brothers will be NOT selected automatically.
For both modes:
- you can click on a blank area to cancel clear all selections.
- you can hold CTRL key to avoid clear the selection statuses of old selected entities.
- you can drag a box from a blank area to box select many entities.
Modify Entity Properties
To modify the properties of an entity, you must first select it, then you can press SPACE key or select the Entity Setting Command on the main command bar to open the Entity Setting Dialog. There are some property options in the dialog.
For all entities, there is 'Basic tab panel in the setting dialog. Please read user manual to get the meaning of each option in the dialog.