Commit graph

109 commits

Author SHA1 Message Date
Richard Davey
4c2df65cff Large refactoring of the Input Manager
Split events out into Game Object and global Pointer ones. Removed redundant topOnly checks (as the source array is already filtered), removing use of 'childOn' functions. Normalizing event data.
2017-07-24 23:47:55 +01:00
photonstorm
68cc76802d Updated the shutdown method. 2017-07-24 17:10:30 +01:00
photonstorm
f81856a75c Updated drag handlers. 2017-07-24 14:10:42 +01:00
photonstorm
102fa3e5d1 Movement event now checks draggable. 2017-07-24 14:10:32 +01:00
photonstorm
81445246dd Updated structure. 2017-07-24 14:09:57 +01:00
photonstorm
91a0b41f90 Up handler goes through draggable list. 2017-07-24 14:09:20 +01:00
photonstorm
812ea7d50b Changed draggable to pointer array. 2017-07-24 14:09:04 +01:00
photonstorm
d068f8decb Added new GetInteractiveObject method. 2017-07-24 14:08:48 +01:00
photonstorm
48389491f3 Added missing var. 2017-07-24 14:08:32 +01:00
photonstorm
ba7e04ff77 Callback result determines processing. 2017-07-24 14:08:26 +01:00
photonstorm
9bd93f36b2 Exposed method. 2017-07-21 14:05:04 +01:00
photonstorm
1cc79a3b23 Added onMove callback and event. Added processMove handler. 2017-07-21 13:59:22 +01:00
Richard Davey
fdf257d9ce Fixed Up and Down events. Working properly including with topOnly. 2017-07-21 04:11:40 +01:00
Richard Davey
1ffb559b75 Added revised up down handlers 2017-07-21 04:05:33 +01:00
Richard Davey
7992dfd569 Refactored to support multi pointers per IO and topOnly 2017-07-21 03:39:55 +01:00
photonstorm
c6a2edd855 Refactored Input Manager as it was getting too large for a single file class. Split up into Scene and Global Managers, broke all functions off into single files and started work on the new multi-pointer flow. 2017-07-20 17:10:12 +01:00
photonstorm
c848d18000 Added processOptions config object to InputManager, allowing to set if all callbacks fire, or just that on the top of the display list. Added Input CONSTs. Updated Input Manager so events only fire once, carrying an array of all impacted GOs as a property. 2017-07-20 14:02:48 +01:00
Richard Davey
474d08f993 Lots of work on making Game Objects draggable 2017-07-18 23:15:28 +01:00
Richard Davey
be5961c512 Exposed input hander in the pointer events 2017-07-18 23:15:07 +01:00
Richard Davey
458d50d20b Added Drag Events 2017-07-18 23:14:35 +01:00
photonstorm
d753c5316d Adding movement processing events. 2017-07-18 17:22:14 +01:00
photonstorm
a2a2d7e753 Events now record x/y position locally. 2017-07-18 13:54:43 +01:00
photonstorm
3f13659534 Added callbacks and extra properties. 2017-07-18 13:54:43 +01:00
photonstorm
7bcfb0ed6c Swapped to PointWithinHitArea instead for clarity. 2017-07-18 13:54:43 +01:00
Richard Davey
0d925b9cc0 New Interactive Object created.
Pointer events now dispatch more details.
Interactive Object used internally everywhere.
Hit Test updated to handle it.
2017-07-18 02:36:45 +01:00
Richard Davey
95dea5c88a Hit Area is now top-left based. Pointer x/y now takes canvas position and scale into account. 2017-07-17 23:38:43 +01:00
Richard Davey
f5c3ab0fcb Handle any origin 2017-07-17 23:38:07 +01:00
photonstorm
2405160cd1 Added continuous polling feature to the Input Manager. 2017-07-14 18:00:15 +01:00
Richard Davey
8bae761d75 Pointer Down and Up events working on Game Objects 2017-07-14 01:38:21 +01:00
Richard Davey
d12522e480 Pointer Over and Out events and lists working 2017-07-14 00:37:54 +01:00
photonstorm
b7d4559d45 Moving to more modular, State based input management. 2017-07-13 17:21:37 +01:00
Richard Davey
7528b6e5a9 Updated Input Manager to use hitArea instead of dimensions 2017-07-13 02:06:00 +01:00
Richard Davey
ed0d445c54 PointScreenToWorldHitTest now always returns an array no matter what 2017-07-12 12:58:34 +01:00
Felipe Alfonso
bb359faa1d Fixed false positive when dealing with mulitple cameras and point hit test 2017-07-11 10:09:40 -04:00
Felipe Alfonso
a3ee32cef4 Point Screen To World Hit test now works with multiple cameras and camera transforms 2017-07-10 22:27:24 -04:00
Felipe Alfonso
ebea116809 PointScreenToWorldHitTest added to Global Input Manager 2017-07-07 15:59:17 -04:00
Richard Davey
f770712c2a Huge refactoring of States, plugins and object factories 2017-07-04 01:59:31 +01:00
photonstorm
4136ccf374 Lots more updates moving everything to consistent class structure. 2017-07-03 16:05:22 +01:00
photonstorm
e119e3a3fc Huge update to move all classes to common Phaser Class format. Tidying up lots. Removing un-needed files. 2017-06-30 15:47:51 +01:00
photonstorm
cc515082e5 Added lastSlope definition to CollisionMap and lots of extra setters in Body. 2017-06-22 16:22:21 +01:00
Richard Davey
001a0cb0d3 Input transform fixed 2017-06-21 00:26:21 +01:00
Felipe Alfonso
2341f7752f Updated code for GetTransformedPoint 2017-06-20 16:47:43 -04:00
Richard Davey
dc05c29740 Input matrix updates 2017-06-19 21:58:23 +01:00
Richard Davey
730c6b5cbf Input updates 2017-06-16 11:11:28 +01:00
Richard Davey
e7465bb17f Added start of the transformed point functions 2017-06-14 02:20:55 +01:00
Richard Davey
cc26ccb2e6 Updated Input Manager to run the show 2017-06-14 01:20:01 +01:00
Richard Davey
b6b7715021 Mouse Input Handler working. Demo created. 2017-06-13 00:38:48 +01:00
photonstorm
ca1b483423 Starting work on the Mouse Input Manager. 2017-06-12 17:03:34 +01:00
photonstorm
8264351f75 Renamed GetObjectValue to GetValue and replaced through-out entire codebase. More consistent now with GetAdvancedValue, etc. 2017-04-26 16:03:22 +01:00
Richard Davey
b6bef1ded9 Fixed issue with component private vars being shared.
Added Key Capture to Keyboard Manager.
Added rotation and angle wrapping.
Optmized getBounds.
2017-02-24 01:45:24 +00:00
Richard Davey
226e0b216d Added KeyCombo.progress. 2017-02-21 23:51:18 +00:00
Richard Davey
fa69035e4f Finished off Key Combo support. All config options now working correctly. 2017-02-21 23:01:05 +00:00
Richard Davey
101be294e0 Adding support for Key Combos. 2017-02-21 20:58:17 +00:00
Richard Davey
fbb591fd94 Tided up the Key handler. 2017-02-21 16:52:40 +00:00
Richard Davey
8fd0a7a531 Finished off the Keyboard Manager, tided up the classes and removed un-needed functions. 2017-02-21 16:05:36 +00:00
Richard Davey
9579263333 New Input Manager and Keyboard handler in and working. 2017-02-21 01:04:37 +00:00
Richard Davey
d480263fa9 BlitterBatch will now flush if you try to add too many Bobs (avoids index error). 2017-02-13 21:50:41 +00:00
Richard Davey
7999f72d81 Moved GetObjectValue into utils/object 2017-02-04 05:39:37 +00:00
Richard Davey
9aa52b5c0a Keyboard Input functions. 2017-01-08 14:14:21 +00:00