game now handles player/commands falling out of the world, updated readme with todo and removed todo.txt

This commit is contained in:
Clevertop 2024-08-11 12:47:57 +10:00
parent 4b4d97746c
commit f1dea7e36d
6 changed files with 48 additions and 36 deletions

View file

@ -5,6 +5,7 @@ class_name Command_Block
@export var command_name : String
@export var command_sprite : Texture2D#:
@export var collider : CollisionShape3D
var spawn_pos : Vector3
#set(new_texture):
#if command_sprite != null:
#command_sprite.changed.disconnect(on_texture_changed)
@ -15,11 +16,15 @@ class_name Command_Block
func _ready():
$MeshInstance3D.material_override = $MeshInstance3D.material_override.duplicate()
$MeshInstance3D.material_override.albedo_texture = command_sprite
spawn_pos = global_position
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if(global_position.y < -25):
global_position = spawn_pos
linear_velocity = Vector3(0,0,0)
pass
#func on_texture_changed():

View file

@ -15,4 +15,7 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if(slot.get_child_count() == 0):
placed_command = null
has_command = false
pass