The spikes go up and down in the view. They need to react to a lever, and should also Deal Damage to Dot. We hit a snag, but do not panic. The idea with the lever goes like this: The Lever has four positions, starts in position 0. For each of the four positions, a lever connected to Spikes should put the spikes in these conditions: 0: cycle up and down, deal damage as directed; 1: stop in the up position, deal damage; 2: stop in the down position, no damage; 4: cycle up and down, deal damage. It is possible that we will want the four conditions to be randomized, so that the player can’t just figure out spike levers once and for all. Save that idea for later. This should be fairly easy to code in a procedural way, and we’ll see how that looks before deciding on anything more clever. It would be good if we could test this behavior. As things stand, Spikes have no tests. Here’s the code: class Animated(Content): @classmethod def spikes(cls, name): resource1 =…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.