Commit be48b3a59e82b51e68e020b8c0338721fe74d6b8
Committed by
Gerrit Code Review
Merge "Changes after Set/Get synchronous behaviour of registered animatable & cu…
…stom properties" into devel/master
Showing
1 changed file
with
5 additions
and
3 deletions
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 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
| @@ -25,6 +25,8 @@ | @@ -25,6 +25,8 @@ | ||
| 25 | #include <dali-toolkit/dali-toolkit.h> | 25 | #include <dali-toolkit/dali-toolkit.h> |
| 26 | #include "shared/view.h" | 26 | #include "shared/view.h" |
| 27 | 27 | ||
| 28 | +#include <dali/devel-api/object/handle-devel.h> | ||
| 29 | + | ||
| 28 | using namespace Dali; | 30 | using namespace Dali; |
| 29 | using namespace Dali::Toolkit; | 31 | using namespace Dali::Toolkit; |
| 30 | using namespace DemoHelper; | 32 | using namespace DemoHelper; |
| @@ -742,7 +744,7 @@ private: | @@ -742,7 +744,7 @@ private: | ||
| 742 | void OnHitPaddle(PropertyNotification& source) | 744 | void OnHitPaddle(PropertyNotification& source) |
| 743 | { | 745 | { |
| 744 | Actor delegate = Actor::DownCast(source.GetTarget()); | 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 | Vector3 ballRelativePosition(mBall.GetCurrentPosition() - mPaddle.GetCurrentPosition()); | 748 | Vector3 ballRelativePosition(mBall.GetCurrentPosition() - mPaddle.GetCurrentPosition()); |
| 747 | ballRelativePosition.Normalize(); | 749 | ballRelativePosition.Normalize(); |
| 748 | 750 | ||
| @@ -777,7 +779,7 @@ private: | @@ -777,7 +779,7 @@ private: | ||
| 777 | void OnHitBrick(PropertyNotification& source) | 779 | void OnHitBrick(PropertyNotification& source) |
| 778 | { | 780 | { |
| 779 | Actor brick = Actor::DownCast(source.GetTarget()); | 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 | const float normalVelocity = fabsf(mBallVelocity.Dot(collisionVector)); | 784 | const float normalVelocity = fabsf(mBallVelocity.Dot(collisionVector)); |
| 783 | mBallVelocity += collisionVector * normalVelocity * 2.0f; | 785 | mBallVelocity += collisionVector * normalVelocity * 2.0f; |