Skip to content

Commit

Permalink
roll games
Browse files Browse the repository at this point in the history
  • Loading branch information
imvickykumar999 committed May 12, 2023
1 parent 476e0ac commit 3c1a352
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Unique3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ def __init__(self, position=(0,0,0),
Voxel(position=(i,0,j))

# else:
# c+=1
# Voxel(
# position=(i,-1,j),
# texture=opt_texture[c%len(opt_texture)],
# default_color=color.random_color(),
# default_color=color.random_color(),
# texture='white_cube',
# # default_color=color.white,
# )

Expand Down Expand Up @@ -104,18 +103,24 @@ def input(key):
player.gravity *= -1

window.fullscreen = 1
player = FirstPersonController(collider='box')
player = FirstPersonController(collider='box',
model='sphere',
color=color.yellow,
texture='heightmap_1')

player.gravity = 10e-2
player.y = 100
player.x = 1
player.y = 2
player.z = 1

def update():
global deatils, player, won, cont
tc = time.time()

# if player.y < -10 or player.y > 250: # respawn
# player.y = 150
if player.y < -10 or player.y > 100: # respawn
player.y = 100

if (player.y < -2) or (tc - t > 100):
if (player.y < -5) or (tc - t > 100):
won.text = 'You Lost'
won.color = color.red

Expand Down
Binary file added static/Super Mario Death.mp3
Binary file not shown.
Binary file added static/Super Mario Won.mp3
Binary file not shown.
Binary file added static/space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/super-mario-bros.mp3
Binary file not shown.
Binary file added static/wall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3c1a352

Please sign in to comment.