| Line | |
|---|
| 1 | #include "shell_command.h" |
|---|
| 2 | #include "cameraman.h" |
|---|
| 3 | |
|---|
| 4 | #include "state.h" |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | cameraman::cameraman() |
|---|
| 10 | { |
|---|
| 11 | currentCam=State::getCamera(); |
|---|
| 12 | cameras[0]=currentCam; |
|---|
| 13 | camAmount=1; |
|---|
| 14 | |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | void cameraman::createCam() |
|---|
| 19 | { |
|---|
| 20 | if (camAmount<6) |
|---|
| 21 | { |
|---|
| 22 | Camera* newCamera=new Camera(); |
|---|
| 23 | cameras[camAmount]=newCamera; |
|---|
| 24 | } |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | void cameraman::setCam(int cameraNo) |
|---|
| 28 | { |
|---|
| 29 | if (cameraNo<camAmount) |
|---|
| 30 | { |
|---|
| 31 | currentCam=cameras[cameraNo]; |
|---|
| 32 | State::setCamera(currentCam, currentCam->getTarget()); |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.