Skip to content

Commit

Permalink
Make update sync again
Browse files Browse the repository at this point in the history
  • Loading branch information
sajmoni committed Jan 8, 2023
1 parent e0cb875 commit 72e0165
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type BehaviorOptions = {
export type Behavior = Delay | Forever | Every

export type Instance = {
update: (deltaTime: number) => Promise<void>
update: (deltaTime: number) => void
delay: (delay: number, options?: BehaviorOptions) => Promise<void>
forever: (
callback: ForeverCallback,
Expand Down Expand Up @@ -184,7 +184,7 @@ export default function createInstance(): Instance {
/**
* Needs to be called on every game update.
*/
const update = async (deltaTime: number): Promise<void> => {
const update = (deltaTime: number): void => {
behaviors.push(...behaviorsToAdd)
behaviorsToAdd = []

Expand Down

0 comments on commit 72e0165

Please sign in to comment.