FEATURE: added the possibility toplay emotes
This commit is contained in:
parent
b57a9957a3
commit
a1d52b4265
23 changed files with 286 additions and 72 deletions
19
front/src/Connexion/EmoteEventStream.ts
Normal file
19
front/src/Connexion/EmoteEventStream.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import {Subject} from "rxjs";
|
||||
|
||||
interface EmoteEvent {
|
||||
userId: number,
|
||||
emoteName: string,
|
||||
}
|
||||
|
||||
class EmoteEventStream {
|
||||
|
||||
private _stream:Subject<EmoteEvent> = new Subject();
|
||||
public stream = this._stream.asObservable();
|
||||
|
||||
|
||||
onMessage(userId: number, emoteName:string) {
|
||||
this._stream.next({userId, emoteName});
|
||||
}
|
||||
}
|
||||
|
||||
export const emoteEventStream = new EmoteEventStream();
|
Loading…
Add table
Add a link
Reference in a new issue