E D R , A S I H C RSS

Py Game

No older revisions available

No older revisions available



SDL 라이브러리를 이용해서 만든 게임개발용 Python 모듈.
사용하기 정말 쉽다. Python Interpreter 에서 한줄 한줄 입력하면서 공부할 수도 있다.

데기PyGame 을 이용해서 3D Viewing System 을 만든바 있다.



pygame.Surface 를 상속받은 새 클래스를 만들 수가 없다. 이상하게도 다음 코드가 Attribute 에러가 난다. 적절히 제약부분에 대해서 생각을 해야 할듯.

~cpp 
class Background(pygame.Surface):
    def __init__(self, aSize):
        pygame.Surface.__init__(self, aSize)
    def clearSurface(self):
        self.fill((0,0,0))

def createBlackScreen(aSize):
    back = Background(aSize)
    back.clearSurface()           <-- 여기서 Attribute 에러
    return back
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:24:08
Processing time 0.0145 sec