Esempio n. 1
0
    def Draw(self):
        self.System.SystemDraw(Resources.GetTexture("background3"), GetVec2(0, 0),
                               GetVec2(self.System.windowWidth, self.System.windowHeight), 0.0,
                               GetVec3(0.3, 0.3, 0.5), GetVec2(1, 1), GetVec2(1, 1))

        for Tile in self.Blocks:
            if not Tile.Destroyed:
                Tile.Draw(self.System)
        self.pGenerator.Draw(self.System)
        super().Draw()
Esempio n. 2
0
    def Draw(self):

        self.System.SystemDraw(Resources.GetTexture("background3"), GetVec2(0, 0),
                               GetVec2(self.System.windowWidth, self.System.windowHeight), 0.0,
                               GetVec3(0.3, 0.3, 0.5), GetVec2(1, 1), GetVec2(1, 1))

        if self.count == 0:
            self.textManager.DrawString(self.System, "START", GetVec2(200, 200), GetVec2(48, 48))
        else:
            self.textManager.DrawString(self.System, "START", GetVec2(200, 200), GetVec2(48, 48), GetVec3(0.5, 0.5, 0.5))

        if self.count == 1:
            self.textManager.DrawString(self.System, "EXIT", GetVec2(200, 300), GetVec2(48, 48))
        else:
            self.textManager.DrawString(self.System, "EXIT", GetVec2(200, 300), GetVec2(48, 48), GetVec3(0.5, 0.5, 0.5))
Esempio n. 3
0
    def InitLevel(self):
        super().InitLevel()
        self.player = Player(PathToProject() + "res/GameObjects/PlayerShip.xml")
        block1 = Block(PathToProject() + "res/GameObjects/block.xml")
        block2 = Block(PathToProject() + "res/GameObjects/block.xml")
        block2.position.x = 800

        self.textManager = TextManager("textsheet", "/Text/8x8text_whiteNoShadow.png", "/Text/textCoord.xml")

        self.audio = AudioManager()
        self.audio.LoadSound("/SoundEffects/scifi_weapon1.wav", "wep1")

        Resources.LoadTexture("/Textures/ball.png", 1, "particle")

        self.PGen = self.System.GetGenerator(Resources.GetTexture("particle"), 50)

        self.AddObject(block1)
        self.AddObject(block2)
        self.AddObject(self.player)
Esempio n. 4
0
 def StartScene(self, system, backgroundColor):
     system.SystemDraw(Resources.GetTexture(self.background), GetVec2(0, 0),
                       GetVec2(self.SceneWidth, self.SceneHeight),
                       0.0, backgroundColor, GetVec2(1, 1), GetVec2(1, 1))