فهرست منبع

FollowerObject: don't syncPos when getSize

Tom Spira 4 سال پیش
والد
کامیت
253676e54a
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      h2d/ObjectFollower.hx

+ 9 - 0
h2d/ObjectFollower.hx

@@ -121,6 +121,15 @@ class ObjectFollower extends Object {
 	}
 
 	override function syncPos() {
+		if( follow == null ) {
+			if( posChanged ) {
+				calcAbsPos();
+				for( c in children )
+					c.posChanged = true;
+				posChanged = false;
+			}
+			return;
+		}
 		followObject();
 		super.syncPos();
 	}