Renamed input manager files and refs.

This commit is contained in:
Richard Davey 2018-01-16 16:14:21 +00:00
parent b4a01bb877
commit 26fd3ee661
8 changed files with 36 additions and 43 deletions

View file

@ -13,7 +13,7 @@ var AnimationManager = require('../animations/AnimationManager');
var CreateRenderer = require('./CreateRenderer');
var Data = require('../data/Data');
var GlobalCache = require('../cache/GlobalCache');
var GlobalInputManager = require('../input/GlobalInputManager');
var InputManager = require('../input/InputManager');
var GlobalSceneManager = require('../scene/global/GlobalSceneManager');
var PluginManager = require('../plugins/PluginManager');
var SoundManagerCreator = require('../sound/SoundManagerCreator');
@ -116,9 +116,9 @@ var Game = new Class({
/**
* [description]
*
* @property {Phaser.Input.GlobalInputManager} input
* @property {Phaser.Input.InputManager} input
*/
this.input = new GlobalInputManager(this, this.config);
this.input = new InputManager(this, this.config);
/**
* [description]
@ -151,7 +151,7 @@ var Game = new Class({
/**
* [description]
*
* @property {Phaser.Input.GlobalInputManager} input
* @property {Phaser.Plugins.PluginManager} plugins
*/
this.plugins = new PluginManager(this, this.config);

View file

@ -1,4 +1,4 @@
// Phaser.Input.GlobalInputManager
// Phaser.Input.InputManager
var Class = require('../utils/Class');
var EventEmitter = require('eventemitter3');
@ -9,11 +9,11 @@ var Pointer = require('./Pointer');
var Touch = require('./touch/TouchManager');
var TransformXY = require('../math/TransformXY');
var GlobalInputManager = new Class({
var InputManager = new Class({
initialize:
function GlobalInputManager (game, config)
function InputManager (game, config)
{
this.game = game;
@ -278,4 +278,4 @@ var GlobalInputManager = new Class({
});
module.exports = GlobalInputManager;
module.exports = InputManager;

View file

@ -1,35 +1,35 @@
var Class = require('../../utils/Class');
var Class = require('../utils/Class');
var EventEmitter = require('eventemitter3');
var DistanceBetween = require('../../math/distance/DistanceBetween');
var InteractiveObject = require('../InteractiveObject');
var Circle = require('../../geom/circle/Circle');
var CircleContains = require('../../geom/circle/Contains');
var Ellipse = require('../../geom/ellipse/Ellipse');
var EllipseContains = require('../../geom/ellipse/Contains');
var Rectangle = require('../../geom/rectangle/Rectangle');
var RectangleContains = require('../../geom/rectangle/Contains');
var Triangle = require('../../geom/triangle/Triangle');
var TriangleContains = require('../../geom/triangle/Contains');
var DistanceBetween = require('../math/distance/DistanceBetween');
var InteractiveObject = require('./InteractiveObject');
var Circle = require('../geom/circle/Circle');
var CircleContains = require('../geom/circle/Contains');
var Ellipse = require('../geom/ellipse/Ellipse');
var EllipseContains = require('../geom/ellipse/Contains');
var Rectangle = require('../geom/rectangle/Rectangle');
var RectangleContains = require('../geom/rectangle/Contains');
var Triangle = require('../geom/triangle/Triangle');
var TriangleContains = require('../geom/triangle/Contains');
// Drag Events
// https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
// Mouse Events
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
var SceneInputManager = new Class({
var InputPlugin = new Class({
Extends: EventEmitter,
initialize:
function SceneInputManager (scene)
function InputPlugin (scene)
{
EventEmitter.call(this);
// The Scene that owns this plugin
this.scene = scene;
// GlobalInputManager
// InputManager
this.manager = scene.sys.game.input;
// A reference to this.scene.sys.displayList (set in boot)
@ -992,4 +992,4 @@ var SceneInputManager = new Class({
});
module.exports = SceneInputManager;
module.exports = InputPlugin;

View file

@ -3,7 +3,10 @@
module.exports = {
Gamepad: require('./gamepad'),
InteractiveObject: require('./InteractiveObject'),
Keyboard: require('./keyboard'),
Mouse: require('./mouse')
Mouse: require('./mouse'),
Pointer: require('./Pointer'),
Touch: require('./touch')
};

7
src/input/touch/index.js Normal file
View file

@ -0,0 +1,7 @@
// Phaser.Input.Touch
module.exports = {
TouchManager: require('./TouchManager')
};

View file

@ -7,7 +7,7 @@ var DisplayList = require('../plugins/DisplayList');
var EventEmitter = require('eventemitter3');
var GameObjectCreator = require('../plugins/GameObjectCreator');
var GameObjectFactory = require('../plugins/GameObjectFactory');
var InputManager = require('../plugins/InputManager');
var InputManager = require('../../input/InputPlugin');
var Loader = require('../plugins/Loader');
var PhysicsManager = require('../plugins/PhysicsManager');
var SceneManager = require('../plugins/SceneManager');

View file

@ -1,17 +0,0 @@
var Class = require('../../utils/Class');
var SceneInputManager = require('../../input/local/SceneInputManager');
var InputManager = new Class({
Extends: SceneInputManager,
initialize:
function InputManager (scene)
{
SceneInputManager.call(this, scene);
}
});
module.exports = InputManager;