@momo2555/koppeliajs 0.0.153 → 0.0.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/play.d.ts +7 -0
- package/dist/scripts/play.js +13 -0
- package/dist/scripts/song.js +1 -1
- package/package.json +1 -1
package/dist/scripts/play.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export declare class Play {
|
|
|
12
12
|
private _playFileName;
|
|
13
13
|
private _console;
|
|
14
14
|
private _refreshed;
|
|
15
|
+
private _playContent;
|
|
16
|
+
private _playContentLoaded;
|
|
15
17
|
constructor(console: Console, playId: string, playRawObj: {
|
|
16
18
|
[key: string]: any;
|
|
17
19
|
});
|
|
@@ -21,6 +23,11 @@ export declare class Play {
|
|
|
21
23
|
getMediaData(): Promise<{
|
|
22
24
|
[key: string]: any;
|
|
23
25
|
}>;
|
|
26
|
+
updatePlayContent(): Promise<void>;
|
|
27
|
+
get playContent(): {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
};
|
|
30
|
+
isPlayContentLoaded(): boolean;
|
|
24
31
|
/**
|
|
25
32
|
* Get the data of the play
|
|
26
33
|
*/
|
package/dist/scripts/play.js
CHANGED
|
@@ -12,6 +12,8 @@ export class Play {
|
|
|
12
12
|
_playFileName = "";
|
|
13
13
|
_console;
|
|
14
14
|
_refreshed = true;
|
|
15
|
+
_playContent = {};
|
|
16
|
+
_playContentLoaded = false;
|
|
15
17
|
constructor(console, playId, playRawObj) {
|
|
16
18
|
this._console = console;
|
|
17
19
|
this._playId = playId;
|
|
@@ -24,6 +26,7 @@ export class Play {
|
|
|
24
26
|
if (playRawObj.file_name !== undefined) {
|
|
25
27
|
this._playFileName = playRawObj.file_name;
|
|
26
28
|
}
|
|
29
|
+
this._playContentLoaded = false;
|
|
27
30
|
}
|
|
28
31
|
getPlayMediaPath(mediaName) {
|
|
29
32
|
return `media/game/${this._playGameId}/play/${this._playId}/${mediaName}`;
|
|
@@ -39,6 +42,16 @@ export class Play {
|
|
|
39
42
|
async getMediaData() {
|
|
40
43
|
return await this.getMediaContent(this._playFileName);
|
|
41
44
|
}
|
|
45
|
+
async updatePlayContent() {
|
|
46
|
+
this._playContent = await this.getMediaData();
|
|
47
|
+
this._playContentLoaded = true;
|
|
48
|
+
}
|
|
49
|
+
get playContent() {
|
|
50
|
+
return this._playContent;
|
|
51
|
+
}
|
|
52
|
+
isPlayContentLoaded() {
|
|
53
|
+
return this._playContentLoaded;
|
|
54
|
+
}
|
|
42
55
|
/**
|
|
43
56
|
* Get the data of the play
|
|
44
57
|
*/
|
package/dist/scripts/song.js
CHANGED