From bdd727695d2fe25bb235ee33c3c62d95872b1328 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Tue, 11 Apr 2017 11:14:29 +0100 Subject: [PATCH] Changes after Set/Get synchronous behaviour of registered animatable & custom properties Change-Id: Icee24bd6eedfb1764513c763393bd2a9a2853341 --- examples/blocks/blocks-example.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/blocks/blocks-example.cpp b/examples/blocks/blocks-example.cpp index cc77453..ed7195f 100644 --- a/examples/blocks/blocks-example.cpp +++ b/examples/blocks/blocks-example.cpp @@ -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 #include "shared/view.h" +#include + 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(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(source.GetTargetProperty()); + Vector3 collisionVector = DevelHandle::GetCurrentProperty< Vector3 >( brick, source.GetTargetProperty() ); const float normalVelocity = fabsf(mBallVelocity.Dot(collisionVector)); mBallVelocity += collisionVector * normalVelocity * 2.0f; -- 2.7.4