diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-26 17:55:27 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-26 17:55:27 -0600 |
commit | 6ce6946a4401d2ee6fa5cb747fab7d4c658a63c8 (patch) | |
tree | e60767dc5295edf379cf421e20171dc418e548b7 /server/src/network/index.ts | |
parent | 594921352c8d82fe5f1a6201a4d5f9fbd9b719fc (diff) | |
download | jumpstorm-6ce6946a4401d2ee6fa5cb747fab7d4c658a63c8.tar.gz jumpstorm-6ce6946a4401d2ee6fa5cb747fab7d4c658a63c8.zip |
add entity updates over network!
Diffstat (limited to 'server/src/network/index.ts')
-rw-r--r-- | server/src/network/index.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/src/network/index.ts b/server/src/network/index.ts index 8ffa689..3cbf0ac 100644 --- a/server/src/network/index.ts +++ b/server/src/network/index.ts @@ -1,16 +1,29 @@ import { Message } from '@engine/network'; +import { Input } from '@engine/systems'; export * from './MessageProcessor'; export * from './MessagePublisher'; export * from './MessageReceiver'; +export * from './SessionManager'; +export * from './SessionInputSystem'; export type SessionData = { sessionId: string }; export type Session = { sessionId: string; controllableEntities: Set<string>; + inputSystem: Input; }; export interface ServerMessage extends Message { sessionData: SessionData; } + +export interface SessionManager { + uniqueSessionId(): string; + getSession(id: string): Session | undefined; + getSessions(): string[]; + putSession(id: string, session: Session): void; + removeSession(id: string): void; + numSessions(): number; +} |