A Minecraft style clone in Godot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

20 lines
492 B

class_name World
extends Node3D
const BLOCK_PREFAB: PackedScene = preload("res://scenes/blocks/block.tscn")
func _ready() -> void:
create_block(Block.Types.DIRT, Vector3.ZERO)
create_block(Block.Types.STONE, Vector3.ONE)
func create_block(block_type: Block.Types, block_position: Vector3) -> void:
var block: Block = BLOCK_PREFAB.instantiate()
block.position = block_position
block.name = "%s" % [block_position]
block.type = block_type
block.apply_material()
add_child(block)