Changes after Set/Get synchronous behaviour of registered animatable & custom properties 70/124470/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 11 Apr 2017 10:14:29 +0000 (11:14 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 20 Apr 2017 14:57:31 +0000 (15:57 +0100)
Change-Id: Icee24bd6eedfb1764513c763393bd2a9a2853341

examples/blocks/blocks-example.cpp

index cc77453..ed7195f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,6 +25,8 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include "shared/view.h"
 
+#include <dali/devel-api/object/handle-devel.h>
+
 using namespace Dali;
 using namespace Dali::Toolkit;
 using namespace DemoHelper;
@@ -742,7 +744,7 @@ private:
   void OnHitPaddle(PropertyNotification& source)
   {
     Actor delegate = Actor::DownCast(source.GetTarget());
-    Vector3 collisionVector = delegate.GetProperty<Vector3>(source.GetTargetProperty());
+    Vector3 collisionVector = DevelHandle::GetCurrentProperty< Vector3 >( delegate, source.GetTargetProperty() );
     Vector3 ballRelativePosition(mBall.GetCurrentPosition() - mPaddle.GetCurrentPosition());
     ballRelativePosition.Normalize();
 
@@ -777,7 +779,7 @@ private:
   void OnHitBrick(PropertyNotification& source)
   {
     Actor brick = Actor::DownCast(source.GetTarget());
-    Vector3 collisionVector = brick.GetProperty<Vector3>(source.GetTargetProperty());
+    Vector3 collisionVector = DevelHandle::GetCurrentProperty< Vector3 >( brick, source.GetTargetProperty() );
 
     const float normalVelocity = fabsf(mBallVelocity.Dot(collisionVector));
     mBallVelocity += collisionVector * normalVelocity * 2.0f;