betere collision shapes, wat cleanup

This commit is contained in:
2023-02-02 16:59:05 +01:00
parent 7c5e3b9958
commit 8e6b0784e5
9 changed files with 46 additions and 32 deletions
+2 -4
View File
@@ -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