Skip to content

Add update function to GameConfig #136

@yiochen

Description

@yiochen

Summary
Add update function to GameConfig. GameConfig should also take in a refreshInterval. The refreshInterval means how many milliseconds should the update function in the GameConfig be called after the game is started. If refreshInterval is 0, we should not call update. We should also stop calling update when the game ends(onEnd).

User can use this function to implement some time-based logic. For example, update the player's position every 500ms.

Create a simple demo to use this. For example, modify tic-tac-toe to display the opponent's mouse cursor at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions