Littluns

Littluns Commit Details

Date:2011-09-19 11:33:15 (1 year 8 months ago)
Author:Ciaran Gultnieks
Branch:master
Commit:a3c9bf5893de00d9362de5aad15f43ac056a66f8
Parents: 5330e540519f21188035a2ae935d6d4e01e59370
Message:Counting level adjustments

Changes:
Mcounting.py (5 diffs)

File differences

counting.py
103103
104104
105105
106
107
108
106109
107110
108111
......
110113
111114
112115
113
116
114117
115118
116119
......
120123
121124
122125
123
126
124127
125128
126129
......
187190
188191
189192
193
190194
191195
192196
193197
194198
199
200
201
202
195203
196204
197205
......
221229
222230
223231
232
224233
225234
226235
self.chomper = pygame.transform.smoothscale(self.chomper,
(self.chompheight, self.chompheight))
self.numsounds = []
for i in range(9):
self.numsounds.append(game.load_sound('%s.ogg' % str(i + 1)))
self.setup_level()
def setup_level(self):
#Decide how many different kinds of object we'll have:
num_kinds = int(self.level / 3) + 1
num_kinds = int(self.level / 6) + 1
if num_kinds > 5:
num_kinds = 5
kinds = kinds[:num_kinds]
#Maximum number of each one?
maxofeach = int(self.level / 6) + 3
maxofeach = int(self.level / 8) + 3
if maxofeach > 9:
maxofeach = 9
self.items.remove(self.chomptargets[0])
self.chomptargets = self.chomptargets[1:]
if len(self.chomptargets) == 0:
self.curask += 1
if self.curask == len(self.curitems):
self.level += 1
self.setup_level()
else:
self.numsounds[self.chompnum - 1].play()
self.chompnum += 1
else:
self.chompx += xmove
self.chompy += ymove
self.chomptargets.append(None)
self.chompx = -self.chompheight
self.chompy = sprs[0].rect.center[1]
self.chompnum = 1
else:
#Wrong - sound effect?
pass

Archive Download the corresponding diff file

Branches