* The object can take 5 states: OnFloor, Falling, Jumping, GrabbingPlatform and OnLadder. * The implementations of this interface hold the specific behaviors and internal state of theses 5 states. * @see PlatformerObjectRuntimeBehavior.doStepPreEvents to understand how the functions are called
| 1882 | * @see PlatformerObjectRuntimeBehavior.doStepPreEvents to understand how the functions are called. |
| 1883 | */ |
| 1884 | interface State { |
| 1885 | /** |
| 1886 | * Called when the object leaves this state. |
| 1887 | * It's a good place to reset the internal state. |
| 1888 | * @see OnFloor.enter that is not part of the interface because it takes specific parameters. |
| 1889 | */ |
| 1890 | leave(): void; |
| 1891 | /** |
| 1892 | * Called before the obstacle search. |
| 1893 | * The object position may need adjustments to handle external changes. |
| 1894 | */ |
| 1895 | beforeUpdatingObstacles(timeDelta: float): void; |
| 1896 | /** |
| 1897 | * Check if transitions to other states are needed and apply them before moving horizontally. |
| 1898 | */ |
| 1899 | checkTransitionBeforeX(): void; |
| 1900 | /** |
| 1901 | * Use _requestedDeltaX and _requestedDeltaY to choose the movement that suits the state before moving horizontally. |
| 1902 | */ |
| 1903 | beforeMovingX(): void; |
| 1904 | /** |
| 1905 | * Check if transitions to other states are needed and apply them before moving vertically. |
| 1906 | */ |
| 1907 | checkTransitionBeforeY(timeDelta: float): void; |
| 1908 | /** |
| 1909 | * Use _requestedDeltaY to choose the movement that suits the state before moving vertically. |
| 1910 | */ |
| 1911 | beforeMovingY(timeDelta: float, oldX: float): void; |
| 1912 | |
| 1913 | getNetworkSyncData(): StateNetworkSyncData; |
| 1914 | |
| 1915 | updateFromNetworkSyncData(syncData: StateNetworkSyncData): void; |
| 1916 | } |
| 1917 | |
| 1918 | /** |
| 1919 | * The object is on the floor standing or walking. |
no outgoing calls
no test coverage detected