From 409dee047d35ed9b105d1b32d869c8406e71af45 Mon Sep 17 00:00:00 2001 From: Jean-Marc Viglino Date: Sun, 2 Apr 2017 19:09:48 +0200 Subject: [PATCH] [ADD] Sprite path --- examples/map.sprite.destination.html | 149 +++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 examples/map.sprite.destination.html diff --git a/examples/map.sprite.destination.html b/examples/map.sprite.destination.html new file mode 100644 index 0000000..517fa23 --- /dev/null +++ b/examples/map.sprite.destination.html @@ -0,0 +1,149 @@ + + + + + OL3-games: Sprite destination + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fork me on GitHub + + +

OL3-ext: Sprite destination

+
+
+ This example show how to give a destination to a sprite. +
+ You just have to use the ol.Sprite.setDestination() to set the destination you want to go. + Then just call ol.Sprite.move() in the game loop to have the sprite moving to that point. +
+ Listen to destination event to know when the sprite reach the final destination. +
+ + +
+ +
+

Options:

+ + Click on the map to move Orky. +
+ + + + + + \ No newline at end of file