Skip to content

Commit

Permalink
Update dank.game.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SirDank committed Jan 13, 2024
1 parent a15813a commit f273c66
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions __modules__/dank.game.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from ursina import *
from dankware import cls, clr, title
from numpy.random import choice, randint
from ursina.scripts.smooth_follow import SmoothFollow
from ursina.prefabs.first_person_controller import FirstPersonController

cls()
Expand Down Expand Up @@ -47,6 +48,7 @@

#player = EditorCamera()
player = FirstPersonController(speed=2.5)
player_camera = Entity(parent=camera, position=(0.5, -0.5, 0.8), rotation=(0, 135, 5))
sky = Sky(texture='sky.png')

world_size = 250 # n*2 x n*2
Expand Down Expand Up @@ -75,11 +77,11 @@

def enable_lighting():

global torch
scene.fog_density = 0.2
scene.fog_color = color.black
torch = Entity(parent=camera, model="flashlight.gltf", position=(0.5, -0.5, 0.8), rotation=(0, 135, 5), scale=0.3)
torch_light = SpotLight(parent=camera, color=color.white, position=(0.5, -0.5, -5), rotation=(0, 0, 0))
torch = Entity(model="flashlight.gltf", scale=0.3)
torch_light = SpotLight(parent=torch, color=color.white, position=(3, 0.5, 4.2), rotation=(0, -135, -5))
torch.add_script(SmoothFollow(target=player_camera, rotation_speed=10))

enable_lighting()

Expand Down

0 comments on commit f273c66

Please sign in to comment.