diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-01-11 10:32:15 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-01-11 10:32:15 +0100 |
| commit | ff3abf9d87a502cdf31a5f4abcbbf1826fd64fc9 (patch) | |
| tree | 43e0a2734bc16d5906decf05662d30436cb42313 /objects.js | |
| parent | 09d04ecd59279513015274a1386d345e3f8a1640 (diff) | |
| parent | 3c03814833a272b305cbac5ad7f70190ec2a8926 (diff) | |
| download | snap-ff3abf9d87a502cdf31a5f4abcbbf1826fd64fc9.tar.gz snap-ff3abf9d87a502cdf31a5f4abcbbf1826fd64fc9.zip | |
merge mobileapp
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -415,6 +415,11 @@ SpriteMorph.prototype.initBlocks = function () { spec: 'go back %n layers', defaults: [1] }, + doNotify: { + type: 'command', + category: 'looks', + spec: 'notification with title %s and content %s' + }, doScreenshot: { type: 'command', category: 'looks', @@ -933,6 +938,31 @@ SpriteMorph.prototype.initBlocks = function () { category: 'sensing', spec: 'current %dates' }, + doVibrate: { + type: 'command', + category: 'sensing', + spec: 'vibrate %n seconds' + }, + reportCompassHeading: { + type: 'reporter', + category: 'sensing', + spec: 'current compass heading' + }, + reportAccelerationX: { + type: 'reporter', + category: 'sensing', + spec: 'current acceleration along the x axes' + }, + reportAccelerationY: { + type: 'reporter', + category: 'sensing', + spec: 'current acceleration along the y axes' + }, + reportAccelerationZ: { + type: 'reporter', + category: 'sensing', + spec: 'current acceleration along the z axes' + }, reportLanguage: { type: 'reporter', category: 'sensing', @@ -1818,6 +1848,8 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('comeToFront')); blocks.push(block('goBack')); + blocks.push('-'); + blocks.push(block('doNotify')); // for debugging: /////////////// @@ -1988,6 +2020,14 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('reportLanguage')); blocks.push(block('reportLocation')); + blocks.push('-'); + blocks.push(block('doVibrate')); + blocks.push('-'); + blocks.push(block('reportCompassHeading')); + blocks.push('-'); + blocks.push(block('reportAccelerationX')); + blocks.push(block('reportAccelerationY')); + blocks.push(block('reportAccelerationZ')); // for debugging: /////////////// @@ -4434,6 +4474,8 @@ StageMorph.prototype.init = function (globals) { this.paletteCache = {}; // not to be serialized (!) this.lastAnswer = ''; // last user input, do not persist this.activeSounds = []; // do not persist + this.acceleration = null; // do not persist + this.compassHeading = null; // do not persist this.streamingCamera = false; this.lastCameraCanvas = null; this.lastCameraMotion = new Point(0, 0); @@ -5082,6 +5124,8 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('show')); blocks.push(block('hide')); + blocks.push('-'); + blocks.push(block('doNotify')); // for debugging: /////////////// @@ -5230,6 +5274,14 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('reportLanguage')); blocks.push(block('reportLocation')); + blocks.push('-'); + blocks.push(block('doVibrate')); + blocks.push('-'); + blocks.push(block('reportCompassHeading')); + blocks.push('-'); + blocks.push(block('reportAccelerationX')); + blocks.push(block('reportAccelerationY')); + blocks.push(block('reportAccelerationZ')); // for debugging: /////////////// |
