mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-10 21:39:57 -04:00
Create a new cloud io device
This commit is contained in:
parent
de86eb3f19
commit
4959ab9ff3
2 changed files with 101 additions and 0 deletions
src/engine
|
@ -17,6 +17,7 @@ const Variable = require('./variable');
|
|||
|
||||
// Virtual I/O devices.
|
||||
const Clock = require('../io/clock');
|
||||
const Cloud = require('../io/cloud');
|
||||
const DeviceManager = require('../io/deviceManager');
|
||||
const Keyboard = require('../io/keyboard');
|
||||
const Mouse = require('../io/mouse');
|
||||
|
@ -262,6 +263,7 @@ class Runtime extends EventEmitter {
|
|||
/** @type {Object.<string, Object>} */
|
||||
this.ioDevices = {
|
||||
clock: new Clock(),
|
||||
cloud: new Cloud(),
|
||||
deviceManager: new DeviceManager(),
|
||||
keyboard: new Keyboard(this),
|
||||
mouse: new Mouse(this),
|
||||
|
@ -1383,6 +1385,7 @@ class Runtime extends EventEmitter {
|
|||
this.targets.map(this.disposeTarget, this);
|
||||
this._monitorState = OrderedMap({});
|
||||
// @todo clear out extensions? turboMode? etc.
|
||||
this.ioDevices.cloud.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue