minor changes to comments and such

This commit is contained in:
Dave Schuyler 2004-10-16 00:28:18 +00:00
parent c456d9b515
commit 0d1bf212ce

View File

@ -9,17 +9,14 @@ from direct.directnotify.DirectNotifyGlobal import *
phaseChecker = None phaseChecker = None
class Loader: class Loader:
"""
"""Loader class: contains method to load models, sounds and code""" Load models, textures, sounds, and code.
"""
notify = directNotify.newCategory("Loader") notify = directNotify.newCategory("Loader")
modelCount = 0 modelCount = 0
# special methods # special methods
def __init__(self, base): def __init__(self, base):
"""
Loader constructor
"""
self.base = base self.base = base
self.loader = PandaLoader() self.loader = PandaLoader()
@ -174,7 +171,7 @@ class Loader:
if anisotropicDegree != None: if anisotropicDegree != None:
font.setAnisotropicDegree(anisotropicDegree) font.setAnisotropicDegree(anisotropicDegree)
if lineHeight != None: if lineHeight is not None:
# If the line height is specified, it overrides whatever # If the line height is specified, it overrides whatever
# the font itself thinks the line height should be. This # the font itself thinks the line height should be. This
# and spaceAdvance should be set last, since some of the # and spaceAdvance should be set last, since some of the
@ -182,7 +179,7 @@ class Loader:
# default. # default.
font.setLineHeight(lineHeight) font.setLineHeight(lineHeight)
if spaceAdvance != None: if spaceAdvance is not None:
font.setSpaceAdvance(spaceAdvance) font.setSpaceAdvance(spaceAdvance)
return font return font
@ -193,9 +190,9 @@ class Loader:
texturePath is a string. texturePath is a string.
Attempt to load a texture from the given file path using Attempt to load a texture from the given file path using
TexturePool class. Returns None if not found""" TexturePool class. Returns None if not found
"""
if alphaPath == None: if alphaPath is None:
assert(Loader.notify.debug("Loading texture: %s" % (texturePath) )) assert(Loader.notify.debug("Loading texture: %s" % (texturePath) ))
if phaseChecker: if phaseChecker:
phaseChecker(texturePath) phaseChecker(texturePath)