-
Notifications
You must be signed in to change notification settings - Fork 2
Movable
Isuru Kusumal Rajapakse edited this page Jun 17, 2017
·
1 revision
- Represents a component that defines a behaviors like move, translate etc.
Void
translales the object to the given position
| Name | Type | Description | |
|---|---|---|---|
| x | int |
- x position to move. | |
| y | int |
- y position to move. |
- {}
moves the object by the given amount
| Name | Type | Description | |
|---|---|---|---|
| x | int |
- x amount to move. | |
| y | int |
- y amount to move. |
Void
sets the velocity of the object
| Name | Type | Description | |
|---|---|---|---|
| x | int |
- horizontal velocity component. | |
| y- | int |
vertical velocity component. |
-
GameObjectitself
increases the acceleration of the object
| Name | Type | Description | |
|---|---|---|---|
| x | int |
- horizontal acceleration component. | |
| y- | int |
vertical acceleration component. |
-
GameObjectitself
applies a force to the object
| Name | Type | Description | |
|---|---|---|---|
| x | int |
- horizontal force component. | |
| y- | int |
vertical force component. |
-
GameObjectitself
defines how the movable component change state on one update
Void