Commit bdd727695d2fe25bb235ee33c3c62d95872b1328

Authored by Adeel Kazmi
1 parent 467642cc

Changes after Set/Get synchronous behaviour of registered animatable & custom properties

Change-Id: Icee24bd6eedfb1764513c763393bd2a9a2853341
examples/blocks/blocks-example.cpp
1 1 /*
2   - * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  2 + * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 3 *
4 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -25,6 +25,8 @@
25 25 #include <dali-toolkit/dali-toolkit.h>
26 26 #include "shared/view.h"
27 27  
  28 +#include <dali/devel-api/object/handle-devel.h>
  29 +
28 30 using namespace Dali;
29 31 using namespace Dali::Toolkit;
30 32 using namespace DemoHelper;
... ... @@ -742,7 +744,7 @@ private:
742 744 void OnHitPaddle(PropertyNotification& source)
743 745 {
744 746 Actor delegate = Actor::DownCast(source.GetTarget());
745   - Vector3 collisionVector = delegate.GetProperty<Vector3>(source.GetTargetProperty());
  747 + Vector3 collisionVector = DevelHandle::GetCurrentProperty< Vector3 >( delegate, source.GetTargetProperty() );
746 748 Vector3 ballRelativePosition(mBall.GetCurrentPosition() - mPaddle.GetCurrentPosition());
747 749 ballRelativePosition.Normalize();
748 750  
... ... @@ -777,7 +779,7 @@ private:
777 779 void OnHitBrick(PropertyNotification& source)
778 780 {
779 781 Actor brick = Actor::DownCast(source.GetTarget());
780   - Vector3 collisionVector = brick.GetProperty<Vector3>(source.GetTargetProperty());
  782 + Vector3 collisionVector = DevelHandle::GetCurrentProperty< Vector3 >( brick, source.GetTargetProperty() );
781 783  
782 784 const float normalVelocity = fabsf(mBallVelocity.Dot(collisionVector));
783 785 mBallVelocity += collisionVector * normalVelocity * 2.0f;
... ...