update core examples
This commit is contained in:
parent
83b810b1eb
commit
eb68dec2ad
17 changed files with 52 additions and 214 deletions
|
@ -5,7 +5,7 @@ raylib [core] example - 2D Camera System
|
|||
"""
|
||||
import pyray
|
||||
|
||||
from raylib.colors import (
|
||||
from pyray import (
|
||||
RAYWHITE,
|
||||
DARKGRAY,
|
||||
RED,
|
||||
|
@ -15,16 +15,12 @@ from raylib.colors import (
|
|||
BLACK,
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
# Initialization
|
||||
MAX_BUILDINGS = 100
|
||||
SCREEN_WIDTH = 800
|
||||
SCREEN_HEIGHT = 450
|
||||
|
||||
pyray.init_window(SCREEN_WIDTH, SCREEN_HEIGHT,
|
||||
'raylib [core] example - 2d camera')
|
||||
pyray.init_window(SCREEN_WIDTH, SCREEN_HEIGHT,'raylib [core] example - 2d camera')
|
||||
|
||||
player = pyray.Rectangle(400, 280, 40, 40)
|
||||
buildings = []
|
||||
|
@ -56,7 +52,6 @@ camera.zoom = 1.0
|
|||
|
||||
pyray.set_target_fps(60) # Set our game to run at 60 frames-per-second
|
||||
|
||||
|
||||
# Main game loop
|
||||
while not pyray.window_should_close(): # Detect window close button or ESC key
|
||||
# Update
|
||||
|
@ -133,6 +128,5 @@ while not pyray.window_should_close(): # Detect window close button or ESC key
|
|||
|
||||
pyray.end_drawing()
|
||||
|
||||
|
||||
# De-Initialization
|
||||
pyray.close_window() # Close window and OpenGL context
|
||||
|
|
Reference in a new issue