Centered the letters in ScoreState. Erased useless files.

This commit is contained in:
2013-01-23 23:27:03 -04:30
parent 89882d8939
commit 25134fea78
13 changed files with 21 additions and 11 deletions

View File

@@ -81,7 +81,7 @@ move to. On a PC just click with the mouse.
Scoring:
Hug people to increase your score. Every 25 hugs increases the current wave.
Enemies become more frequent on higher waves. Hug as many people as you can
before the time runs out.
before the time runs out. Avoid the guys that want to hug you until you explode!
Aditional assets
----------------
@@ -94,3 +94,8 @@ http://www.jamendo.com/es/list/a91205/8bit-easter
The fonts Press Start 2P and Profaisal-EliteRiqa are available in
http://openfontlibrary.org Check the font directory for more information
on the fonts.
Know issues
-----------
*) Music does not always loops on Android. This is a known problem with pgs4a 0.9.4.

2
TODO
View File

@@ -1,2 +0,0 @@
Stuff left:
2) Center the letters in ScoreState.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -63,21 +63,27 @@ class ScoreState(BaseState):
letter_list = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h',
'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm']
q_x_position = int((float(pygame.display.Info().current_w) * 88.0 ) / 1024.0)
image = cached_image_loader.get_image_to_screen_percent('gfx/Fuente/a.png')
q_x_position = self.banner.rect.left + (image.get_width() // 2)
q_y_position = int((float(pygame.display.Info().current_h) * 438.0 ) / 768.0)
letter_sep = int((float(pygame.display.Info().current_w) * 10.0 ) / 1024.0)
for l in letter_list:
image = cached_image_loader.get_image_to_screen_percent('gfx/Fuente/' + l + '.png')
letter_actor = BaseActor(89, image, string.upper(l), False, True, False)
if l == 'a':
q_x_position = int((float(pygame.display.Info().current_w) * 154.0 ) / 1024.0)
q_y_position = int((float(pygame.display.Info().current_h) * 543.0 ) / 768.0)
q_x_position = self.banner.rect.left + image.get_width()
q_y_position = int((float(pygame.display.Info().current_h) * 543.0) / 768.0)
elif l == 'z':
q_x_position = int((float(pygame.display.Info().current_w) * 199.0 ) / 1024.0)
q_y_position = int((float(pygame.display.Info().current_h) * 649.0 ) / 768.0)
q_x_position = self.banner.rect.left + int(1.5 * image.get_width())
q_y_position = int((float(pygame.display.Info().current_h) * 649.0) / 768.0)
letter_actor.set_position([q_x_position, q_y_position])
self.letters[l] = letter_actor
q_x_position += image.get_width() + letter_sep
if l == 'i':
q_x_position += image.get_width() + (2 * letter_sep)
else:
q_x_position += image.get_width() + letter_sep
self.letter_y = int((float(pygame.display.Info().current_h) * 265.0 ) / 768.0)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,5 +1,6 @@
# Miguel Angel Astor Romero. Created on 7-1-2013. #
###################################################
###########################################
# Created on 1-7-2013. Miguel Angel Astor #
###########################################
import pygame
# Valid game states.