A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
import { defineSystem, Query, Mut, Text } from 'esengine';
import { ScoreDisplay } from '../components';
export const scoreSystem = defineSystem(
[Query(ScoreDisplay, Mut(Text))],
(query) => {
for (const [_entity, score, text] of query) {
text.content = `Score: ${score.score}`;
}
},
{ name: 'ScoreSystem' }
);