Skip to content

GameClientApi beta ​

Interface of @v12-engine/client

ts
export interface GameClientApi extends Pick<GameClient, 'abilityTip' | 'applyAnimation' | 'ghost' | 'addLayer' | 'alert' | 'attach' | 'blood' | 'camera' | 'cardSize' | 'cellLayers' | 'cinematics' | 'connection' | 'controller' | 'debrisMost' | 'debug' | 'debugTools' | 'decalsAmount' | 'detail' | 'dialog' | 'doodads' | 'fxAmount' | 'endings' | 'fade' | 'floats' | 'follow' | 'followedId' | 'following' | 'frozen' | 'forHud' | 'frame' | 'freeze' | 'fx' | 'glow' | 'guard' | 'hidden' | 'hitStop' | 'capture' | 'hideHud' | 'hoverOutline' | 'hud' | 'inking' | 'keyboardLock' | 'keys' | 'layers' | 'layout' | 'lights' | 'limits' | 'loadUnits' | 'lockInput' | 'log' | 'logs' | 'lookFrom' | 'on' | 'looks' | 'mapDecals' | 'mapFx' | 'waterfalls' | 'maxFps' | 'menu' | 'minimapPing' | 'onHidden' | 'onStop' | 'outline' | 'pace' | 'peekBars' | 'picture' | 'ping' | 'pings' | 'pingWheel' | 'pins' | 'play' | 'playClip' | 'pointerLock' | 'portraits' | 'preload' | 'quality' | 'recallView' | 'releaseClip' | 'renderer' | 'renderScale' | 'root' | 'runAction' | 'runtime' | 'saves' | 'saveView' | 'sceneShadows' | 'score' | 'screenPass' | 'seeThrough' | 'session' | 'setDialogLook' | 'setEnvironment' | 'setFog' | 'setLighting' | 'settings' | 'showAllBars' | 'sideMarks' | 'skipCinematic' | 'skipLine' | 'stopClip' | 'sounds' | 'speed' | 'state' | 'takeFile' | 'takeHud' | 'team' | 'teamColors' | 'theme' | 'timers' | 'toLastAlert' | 'transitions' | 'ui' | 'unitHud' | 'view' | 'wind' | 'words'>

The client as a game's code is given it: what a hook of the game's view is handed (SettingDef.apply, MenuEntry.run, GameView.input.onKey, Minimap's draw, a listener of on, an action's run…), the members of GameClient the games reach. GameClient is one; a test hands a hook an object of these alone. A part of the client that hands its client to such a hook holds GameClientApi and what else of GameClient it uses (GameClientApi & Pick<GameClient, …>)