File size: 777 Bytes
670a607
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import TCRP from './arcadetcrp.js';

const Recorder = TCRP.Recorder;
const Player = TCRP.Player;
const StepRunner = TCRP.StepRunner;

class ArcadeTCRPPlugin extends Phaser.Plugins.BasePlugin {
    constructor(pluginManager) {
        super(pluginManager);
    }

    start() {
        var eventEmitter = this.game.events;
        eventEmitter.on('destroy', this.destroy, this);
    }

    addRecorder(parent, config) {
        return new Recorder(parent, config);
    }

    addPlayer(parent, config) {
        return new Player(parent, config);
    }

    addStepRunner(parent) {
        return new StepRunner(parent);
    }
}

var methods = {
    runCommands: TCRP.RunCommands
}

Object.assign(
    ArcadeTCRPPlugin.prototype,
    methods
);

export default ArcadeTCRPPlugin;