Effects/LayerMover.h

Sat, 08 Mar 2014 13:55:46 +0200

author
larukedi
date
Sat, 08 Mar 2014 13:55:46 +0200
changeset 401
85c7261e590a
parent 95
706ebab3b092
permissions
-rw-r--r--

added LICENSE and README.md files

1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
1 #pragma once
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
2
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
3 #include "../Resource/GRE.h"
34
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
4 #include "../Engine/Animation.h"
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
5 #include "../Engine/Graphics.h"
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
6 #include "../Engine/Layer.h"
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
7
20
cc549c0f8ebd * geffects >> gorgon::effects
cemkalyoncu
parents: 19
diff changeset
8 namespace gge { namespace effects {
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
9
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
10 ////This effect moves a given layer. Moving operation is animated from a given
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
11 /// value to another one
95
706ebab3b092 * Massive refactoring
cemkalyoncu
parents: 34
diff changeset
12 class LayerMover : public animation::Base {
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
13 public:
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
14
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
15 ////Target of this effect
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
16 LayerBase *Target;
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
17
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
18 ////Initializes the effect
95
706ebab3b092 * Massive refactoring
cemkalyoncu
parents: 34
diff changeset
19 LayerMover(LayerBase *Target, animation::Timer &controller, bool owner=false);
34
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
20 ////Initializes the effect
95
706ebab3b092 * Massive refactoring
cemkalyoncu
parents: 34
diff changeset
21 LayerMover(LayerBase &Target, animation::Timer &controller, bool owner=false);
34
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
22
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
23 ////Initializes the effect
34
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
24 LayerMover(LayerBase *Target, bool create=false);
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
25 ////Initializes the effect
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
26 LayerMover(LayerBase &Target, bool create=false);
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
27
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
28 ////Sets source and destination to the given values and allows time duration to reach the
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
29 /// destination
30
5a1daa2eb409 * Engine and Effects are adapted to new utils
cemkalyoncu
parents: 20
diff changeset
30 void Setup(utils::Point From, utils::Point To, int Time);
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
31 ////Sets current destination to the given value and allows time duration to reach it
30
5a1daa2eb409 * Engine and Effects are adapted to new utils
cemkalyoncu
parents: 20
diff changeset
32 void Setup(utils::Point To, int Time);
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
33
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
34 protected:
30
5a1daa2eb409 * Engine and Effects are adapted to new utils
cemkalyoncu
parents: 20
diff changeset
35 utils::Point2D from;
5a1daa2eb409 * Engine and Effects are adapted to new utils
cemkalyoncu
parents: 20
diff changeset
36 utils::Point2D to;
5a1daa2eb409 * Engine and Effects are adapted to new utils
cemkalyoncu
parents: 20
diff changeset
37 utils::Point2D current;
5a1daa2eb409 * Engine and Effects are adapted to new utils
cemkalyoncu
parents: 20
diff changeset
38 utils::Point2D speed;
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
39
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
40 virtual bool isFinished();
34
e4ad59dfbcc4 * New graphics system
cemkalyoncu
parents: 30
diff changeset
41 virtual animation::ProgressResult::Type Progress();
1
1ef17765f966 * Moving to trunk step 2
cemkalyoncu
parents:
diff changeset
42 };
20
cc549c0f8ebd * geffects >> gorgon::effects
cemkalyoncu
parents: 19
diff changeset
43 } }

mercurial