-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCloud.cpp
More file actions
42 lines (25 loc) · 825 Bytes
/
Copy pathCloud.cpp
File metadata and controls
42 lines (25 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* File: Cloud.cpp
* Author: michael
*
* Created on 26. mars 2013, 16:44
*/
#include <algorithm> // For max_element().
#include "Cloud.h"
namespace ATCsim { // Project ATCsim namespace.
Cloud::Cloud(const std::vector<int16_t>& xCorners,
const std::vector<int16_t>& yCorners,
float cape, unsigned int velocity)
:
Polygon(xCorners, yCorners, 0, 0, 255, 128, cape, velocity) // Parent constructor.
{
}
void Cloud::compute(PosTypes posType, int gameFieldWidth, int gameFieldHeight) {
// This entity can move, we have to compute it.
computeMovement(posType);
}
void Cloud::checkForCollisionDispatch(Entity& entity, PosTypes posType) const {
// Double dispatching (visitor pattern).
entity.checkForCollision(this, posType);
}
} // End of project ATCsim namespace.