Points system added.
This commit is contained in:
parent
3226795d2c
commit
50b5552da8
@ -24,6 +24,7 @@ def monkey_taunt():
|
|||||||
|
|
||||||
def player_action(monkey, reaction):
|
def player_action(monkey, reaction):
|
||||||
if monkey != reaction: return True
|
if monkey != reaction: return True
|
||||||
|
global points
|
||||||
global spanks
|
global spanks
|
||||||
left = 0.7
|
left = 0.7
|
||||||
right = 0.7
|
right = 0.7
|
||||||
@ -32,6 +33,7 @@ def player_action(monkey, reaction):
|
|||||||
p = pygame.mixer.Channel(2)
|
p = pygame.mixer.Channel(2)
|
||||||
p.play(sounds['spank-hit'])
|
p.play(sounds['spank-hit'])
|
||||||
p.set_volume(left, right)
|
p.set_volume(left, right)
|
||||||
|
points += 10
|
||||||
spanks += 1
|
spanks += 1
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -103,6 +105,7 @@ def game(mode):
|
|||||||
message.append("You averaged " + str(round(spanks / (totalTime - startTime), 2)) + " monkey spanks per second.")
|
message.append("You averaged " + str(round(spanks / (totalTime - startTime), 2)) + " monkey spanks per second.")
|
||||||
except:
|
except:
|
||||||
message.append("You averaged 0.00 monkey spanks per second.")
|
message.append("You averaged 0.00 monkey spanks per second.")
|
||||||
|
message.append("You scored " + str(points) + " points.")
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
display_text(message)
|
display_text(message)
|
||||||
return "menu"
|
return "menu"
|
||||||
@ -111,6 +114,7 @@ def game(mode):
|
|||||||
mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game")
|
mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game")
|
||||||
while mode != "exit_game":
|
while mode != "exit_game":
|
||||||
spanks = 0
|
spanks = 0
|
||||||
|
points = 0
|
||||||
if mode == "menu": mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game")
|
if mode == "menu": mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game")
|
||||||
if mode == "start game": mode = game(mode)
|
if mode == "start game": mode = game(mode)
|
||||||
if mode == "learn sounds": mode = learn_sounds(sounds)
|
if mode == "learn sounds": mode = learn_sounds(sounds)
|
||||||
|
Loading…
Reference in New Issue
Block a user