betere collision shapes, wat cleanup
This commit is contained in:
+2
-4
@@ -1,11 +1,10 @@
|
||||
@tool
|
||||
extends Node3D
|
||||
|
||||
const SIZE = 4
|
||||
const SIZE = 5
|
||||
enum Direction {UP, RIGHT, DOWN, LEFT}
|
||||
var sequence = []
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
randomize()
|
||||
|
||||
@@ -23,12 +22,11 @@ func _ready():
|
||||
for i in range(dir):
|
||||
arrow.rotate_90(0)
|
||||
painting.blit_rect(arrow, arrow.get_used_rect() ,Vector2i(x*128, y*128))
|
||||
if randi() % 4 == 0:
|
||||
if randi() % SIZE == 0:
|
||||
painting_em.blit_rect(arrow, arrow.get_used_rect() ,Vector2i(x*128, y*128))
|
||||
sequence.append(dir)
|
||||
for i in range(4-dir):
|
||||
arrow.rotate_90(0)
|
||||
|
||||
|
||||
var texture = ImageTexture.create_from_image(painting)
|
||||
$Canvas.get_surface_override_material(0).albedo_texture = texture
|
||||
|
||||
@@ -28,7 +28,6 @@ func _physics_process(delta):
|
||||
velocity.z = direction.z * WALK_SPEED
|
||||
move_and_slide()
|
||||
|
||||
|
||||
func _on_flash_light_input_event(camera, event, position, normal, shape_idx):
|
||||
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
||||
$Pivot/Camera/FlashLight.visible = true
|
||||
|
||||
+1
-2
@@ -4,7 +4,7 @@ var combination
|
||||
|
||||
func _ready():
|
||||
combination = randi() % 10000
|
||||
$".."/CombiCode.mesh.text = str(combination)
|
||||
$".."/CombiCode.mesh.text = "%04d" % combination #met leading 0'en
|
||||
|
||||
func get_number():
|
||||
return 1000 * $Body/"1"/Cylinder/StaticBody3D.number + \
|
||||
@@ -12,7 +12,6 @@ func get_number():
|
||||
10 * $Body/"3"/Cylinder/StaticBody3D.number + \
|
||||
$Body/"4"/Cylinder/StaticBody3D.number
|
||||
|
||||
|
||||
func _on_static_body_3d_input_event(camera, event, position, normal, shape_idx):
|
||||
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
||||
$Body/Knop/Audio.playing = true
|
||||
|
||||
Reference in New Issue
Block a user