70 |
// PhotoCell |
// PhotoCell |
71 |
// |
// |
72 |
// Photocells are objects (not necessarily stones) that are sensitive |
// Photocells are objects (not necessarily stones) that are sensitive |
73 |
// to laser light. |
// to laser light. |
74 |
//---------------------------------------- |
//---------------------------------------- |
75 |
class PhotoCell { |
class PhotoCell { |
76 |
public: |
public: |
97 |
// light completely or they let it pass, but they do not change their |
// light completely or they let it pass, but they do not change their |
98 |
// internal state when they are hit by light. Certain kinds of stones |
// internal state when they are hit by light. Certain kinds of stones |
99 |
// need to be notified whenever the `light' goes on or off -- these |
// need to be notified whenever the `light' goes on or off -- these |
100 |
// can be derived from this mixin class. |
// can be derived from this class. |
101 |
|
// |
102 |
|
// The most prominent example are Oxyd stones -- they open when they |
103 |
|
// are hit by a laser beam. See the remarks at the beginning of this |
104 |
|
// file to understand why overriding `on_laserhit' is not sufficient |
105 |
|
// for a proper implementation of Oxyd stones. |
106 |
//---------------------------------------- |
//---------------------------------------- |
107 |
class PhotoStone : public Stone, public PhotoCell { |
class PhotoStone : public Stone, public PhotoCell { |
108 |
protected: |
protected: |