Remove doStepPreEvents.

This commit is contained in:
Davy Hélard
2022-09-10 15:11:04 +02:00
parent efb076177d
commit 70c1d600d6
2 changed files with 4 additions and 23 deletions

View File

@@ -156,14 +156,13 @@ export default function ObjectMethodSelectorDialog({
/>
<MethodListItem
icon={<Step style={styles.icon} />}
name={'doStepPreEvents'}
disabled={eventsFunctions.hasEventsFunctionNamed('doStepPreEvents')}
name={'doStepPostEvents'}
disabled={eventsFunctions.hasEventsFunctionNamed('doStepPostEvents')}
onChoose={onChoose}
description={
<Trans>
Events that will be run at every frame (roughly 60 times per
second), for every object, before the events from the events sheet
are launched.
second), for every object, after the events from the events sheet.
</Trans>
}
/>
@@ -187,21 +186,6 @@ export default function ObjectMethodSelectorDialog({
<Subheader>
<Trans>Other lifecycle methods</Trans>
</Subheader>
<MethodListItem
icon={<Step style={styles.icon} />}
name={'doStepPostEvents'}
disabled={eventsFunctions.hasEventsFunctionNamed(
'doStepPostEvents'
)}
onChoose={onChoose}
description={
<Trans>
Events that will be run at every frame (roughly 60 times per
second), for every object, after the events from the events
sheet.
</Trans>
}
/>
</>
)}
</List>

View File

@@ -118,11 +118,8 @@ export const isBehaviorLifecycleEventsFunction = (functionName: string) => {
* that will be called automatically by the game engine.
*/
export const isObjectLifecycleEventsFunction = (functionName: string) => {
// TODO EBO Rename doStepPreEvents and doStepPostEvents
return (
['onCreated', 'doStepPreEvents', 'doStepPostEvents', 'onDestroy'].indexOf(
functionName
) !== -1
['onCreated', 'doStepPostEvents', 'onDestroy'].indexOf(functionName) !== -1
);
};