24 lines
451 B
JavaScript
24 lines
451 B
JavaScript
export class Action {
|
|
constructor(name, scene) {
|
|
this.name = name;
|
|
this.scene = scene;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param src
|
|
* @param dest
|
|
* @param msg
|
|
* @param obj
|
|
* @param symbol
|
|
* @returns {Promise<void>}
|
|
*/
|
|
async log(src, dest, msg, obj, symbol = '->>') {
|
|
await this.scene?.sequence?.log(
|
|
`${src.name} ${symbol} ${dest.name} : ${this.name} ${msg ?? ''} ${
|
|
JSON.stringify(obj) ?? ''
|
|
}`,
|
|
);
|
|
}
|
|
}
|