making levels

This commit is contained in:
Clevertop 2024-08-13 22:45:09 +10:00
parent cc0014f3e8
commit 716dae1d33
17 changed files with 451 additions and 61 deletions

View file

@ -4,17 +4,18 @@ class_name Command_Block
#TODO make this all an enum
@export var command_name : String
@export var mesh : MeshInstance3D
@export var command_sprite : Texture2D:
set(new_texture):
command_sprite = new_texture
mesh.material_override = mesh.material_override.duplicate()
mesh.material_override.albedo_texture = command_sprite
@export var mesh : MeshInstance3D
@export var collider : CollisionShape3D
var spawn_pos : Vector3
# Called when the node enters the scene tree for the first time.
func _ready():
mesh = $MeshInstance3D
mesh.material_override = mesh.material_override.duplicate()
mesh.material_override.albedo_texture = command_sprite
spawn_pos = global_position