mirror of
https://github.com/wassname/phaser.git
synced 2026-08-07 11:26:10 +08:00
InputManager.getLocalPosition(displayObject, pointer, output) will return the local coordinates of the specified displayObject and pointer.
InputManager.hitTest will test for pointer hits against a Sprite/Image, its hitArea (if set) or any of its children.
This commit is contained in:
@@ -71,11 +71,11 @@ function update() {
|
||||
function render() {
|
||||
|
||||
// var p = game.input.getLocalPosition(image);
|
||||
var p = game.input.getLocalPosition(image2);
|
||||
// var p = game.input.getLocalPosition(image2);
|
||||
|
||||
|
||||
game.debug.renderPointInfo(p, 32, 32);
|
||||
game.debug.renderPoint(p);
|
||||
// game.debug.renderPointInfo(p, 32, 32);
|
||||
// game.debug.renderPoint(p);
|
||||
game.debug.renderCircle(image2.hitArea);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user