* A mocked P2P message data. * @implements {gdjs.multiplayerPeerJsHelper.IMessageData}
| 105 | * @implements {gdjs.multiplayerPeerJsHelper.IMessageData} |
| 106 | */ |
| 107 | class MockedMessageData { |
| 108 | /** |
| 109 | * @param {object} data |
| 110 | * @param {string} sender |
| 111 | **/ |
| 112 | constructor(data, sender) { |
| 113 | this.data = data; |
| 114 | this.sender = sender; |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * The data sent alongside the event. |
| 119 | */ |
| 120 | data = {}; |
| 121 | |
| 122 | /** |
| 123 | * The ID of the sender of the event. |
| 124 | */ |
| 125 | sender = ''; |
| 126 | |
| 127 | getData() { |
| 128 | return this.data; |
| 129 | } |
| 130 | |
| 131 | getSender() { |
| 132 | return this.sender; |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * A mocked P2P messages list. |
nothing calls this directly
no outgoing calls
no test coverage detected