updated comments and docstrings
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
"""Module for selection info. Shows egg stats after an egg has been selected from the starting
|
||||
screen. Contains the surface object to be rendered."""
|
||||
|
||||
import pygame
|
||||
from pocket_friends.elements import sprites
|
||||
from pocket_friends.elements import surface
|
||||
@@ -26,6 +29,9 @@ class Surface(surface.GameSurface):
|
||||
self.info_icons = sprites.EggInfo(resources_dir, egg.contentedness, egg.metabolism, (32, 4))
|
||||
|
||||
def update(self):
|
||||
"""
|
||||
Advance the surface logic by one frame.
|
||||
"""
|
||||
self.preprocess()
|
||||
|
||||
self.info_text.draw(self)
|
||||
|
@@ -1,9 +1,21 @@
|
||||
"""Title screen module. Contains the surface object to be rendered on the screen."""
|
||||
import pygame
|
||||
from pocket_friends.elements import surface
|
||||
|
||||
|
||||
class Surface(surface.GameSurface):
|
||||
"""
|
||||
Surface object for the title screen.
|
||||
"""
|
||||
def __init__(self, game_res, resources_dir, game_fps):
|
||||
"""
|
||||
Create a title screen surface object
|
||||
Args:
|
||||
game_res (int): The internal resolution of the game
|
||||
resources_dir (str): The full path of the game's resource directory
|
||||
game_fps (int): The
|
||||
"""
|
||||
|
||||
super().__init__(game_res, resources_dir, game_fps)
|
||||
|
||||
self.frames = 0
|
||||
|
Reference in New Issue
Block a user