play intro
This commit is contained in:
parent
516925a4ff
commit
b8b6abf48c
2 changed files with 22 additions and 1 deletions
|
|
@ -5,3 +5,4 @@ openeo
|
||||||
geopandas
|
geopandas
|
||||||
leafmap
|
leafmap
|
||||||
plotly
|
plotly
|
||||||
|
python-vlc
|
||||||
|
|
@ -13,6 +13,24 @@ DEBUG = False
|
||||||
|
|
||||||
MAX_AMMO = 5
|
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')
|
trinkbrunnen_positions = np.load('trinkbrunnen_pixel_positions.npy')
|
||||||
# Nach dem Laden der Positionen:
|
# Nach dem Laden der Positionen:
|
||||||
|
|
@ -104,6 +122,8 @@ def main():
|
||||||
bottles = []
|
bottles = []
|
||||||
minimap_visible = True
|
minimap_visible = True
|
||||||
clock = pygame.time.Clock()
|
clock = pygame.time.Clock()
|
||||||
|
|
||||||
|
play_intro_video(WIN, "videos/test.mov")
|
||||||
running = True
|
running = True
|
||||||
while running:
|
while running:
|
||||||
clock.tick(60)
|
clock.tick(60)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue