Last change
on this file since 3945 was
3945,
checked in by snellen, 18 years ago
|
wrote prototype for prisoner, guard, secondguard
|
File size:
1014 bytes
|
Line | |
---|
1 | cellDoorOpend = false |
---|
2 | exitReached = false |
---|
3 | hangarReached = false |
---|
4 | spaceShipReached = false |
---|
5 | spaceShipEntered = false |
---|
6 | |
---|
7 | |
---|
8 | function setCellDoor(timestep) |
---|
9 | cellDoorOpened = true |
---|
10 | return true |
---|
11 | end |
---|
12 | |
---|
13 | |
---|
14 | function walkInCell(timestep) |
---|
15 | |
---|
16 | end |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | function goToExit(timestep) |
---|
21 | -- do not forget to make him wait untill the player triggeres the trip to the hangar |
---|
22 | |
---|
23 | return false |
---|
24 | end |
---|
25 | |
---|
26 | |
---|
27 | function goToHangar(timestep) |
---|
28 | |
---|
29 | |
---|
30 | return false |
---|
31 | |
---|
32 | end |
---|
33 | |
---|
34 | |
---|
35 | function goToSpaceship(timestep) |
---|
36 | |
---|
37 | return false |
---|
38 | |
---|
39 | end |
---|
40 | |
---|
41 | |
---|
42 | function enterSpaceship(timestep) |
---|
43 | |
---|
44 | return false |
---|
45 | end |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | function tick(timestep) |
---|
50 | |
---|
51 | if not cellDoorOpend then |
---|
52 | walkInCell(timestep) |
---|
53 | end |
---|
54 | |
---|
55 | if cellDoorOpened and not exitReached then |
---|
56 | exitReached = goToExit(timestep) |
---|
57 | end |
---|
58 | |
---|
59 | if exitReached and not hangarReached then |
---|
60 | hangarReached = goToHangar(timestep) |
---|
61 | end |
---|
62 | |
---|
63 | if hangarReached and not spaceShipReached then |
---|
64 | spaceShipReached = goToSpaceship(timestep) |
---|
65 | end |
---|
66 | |
---|
67 | if spaceShipReached and not spaceShipEntered then |
---|
68 | spaceShipEntered = enterSpaceship(timestep) |
---|
69 | end |
---|
70 | |
---|
71 | if spaceShipEntered then |
---|
72 | return true |
---|
73 | end |
---|
74 | |
---|
75 | return false |
---|
76 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.