play intro

This commit is contained in:
Aron Petau 2025-10-12 12:23:12 +02:00
parent 516925a4ff
commit b8b6abf48c
2 changed files with 22 additions and 1 deletions

View file

@ -4,4 +4,5 @@ numpy
openeo
geopandas
leafmap
plotly
plotly
python-vlc

View file

@ -13,6 +13,24 @@ DEBUG = False
MAX_AMMO = 5
import vlc
import pygame
def play_intro_video(win, video_path):
instance = vlc.Instance()
player = instance.media_player_new()
media = instance.media_new(video_path)
player.set_media(media)
player.set_xwindow(win.get_window_id()) # Für Linux, für Windows/Mac ggf. anpassen
player.play()
# Warte bis das Video fertig ist oder eine Taste gedrückt wird
playing = True
while playing:
for event in pygame.event.get():
if event.type == pygame.KEYDOWN or event.type == pygame.QUIT:
player.stop()
playing = False
pygame.time.wait(100)
trinkbrunnen_positions = np.load('trinkbrunnen_pixel_positions.npy')
# Nach dem Laden der Positionen:
@ -104,6 +122,8 @@ def main():
bottles = []
minimap_visible = True
clock = pygame.time.Clock()
play_intro_video(WIN, "videos/test.mov")
running = True
while running:
clock.tick(60)