Selaa lähdekoodia

EmittedLastFrame on Interactive (Alex)

clementlandrin 11 kuukautta sitten
vanhempi
commit
5101297ba6
1 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa
  1. 12 0
      h3d/scene/Interactive.hx

+ 12 - 0
h3d/scene/Interactive.hx

@@ -52,6 +52,8 @@ class Interactive extends Object implements hxd.SceneEvents.Interactive {
 	 */
 	 */
 	public var isAbsoluteShape : Bool = false;
 	public var isAbsoluteShape : Bool = false;
 
 
+	public var emittedLastFrame : Bool = false;
+
 	var scene : Scene;
 	var scene : Scene;
 	var mouseDownButton : Int = -1;
 	var mouseDownButton : Int = -1;
 	var lastClickFrame : Int = -1;
 	var lastClickFrame : Int = -1;
@@ -127,6 +129,16 @@ class Interactive extends Object implements hxd.SceneEvents.Interactive {
 		super.onRemove();
 		super.onRemove();
 	}
 	}
 
 
+	override function sync(ctx){
+		super.sync(ctx);
+		emittedLastFrame = false;
+	}
+
+	override function emit(ctx){
+		super.emit(ctx);
+		emittedLastFrame = true;
+	}
+
 	/**
 	/**
 		This can be called during or after a push event in order to prevent the release from triggering a click.
 		This can be called during or after a push event in order to prevent the release from triggering a click.
 	**/
 	**/