diff --git a/MyObsidianVault/AWA/Blender/Exporting to Godot as glb/Export Settings.md b/MyObsidianVault/AWA/Blender/Exporting to Godot as glb/Export Settings.md new file mode 100644 index 0000000..c1f4bd4 --- /dev/null +++ b/MyObsidianVault/AWA/Blender/Exporting to Godot as glb/Export Settings.md @@ -0,0 +1 @@ +![[Pasted image 20240320114003.png]] \ No newline at end of file diff --git a/MyObsidianVault/Godot_Training/2D/Tutorial Game 2 - Loot it all/2024-03-20 Simple signal example.md b/MyObsidianVault/Godot_Training/2D/Tutorial Game 2 - Loot it all/2024-03-20 Simple signal example.md new file mode 100644 index 0000000..610ce24 --- /dev/null +++ b/MyObsidianVault/Godot_Training/2D/Tutorial Game 2 - Loot it all/2024-03-20 Simple signal example.md @@ -0,0 +1,43 @@ +````python +extends Area2D + +var max_speed := 1200.0 +var velocity := Vector2(0, 0) +var steering_factor := 3.0 + +var health := 10 + + +func _ready() -> void: + area_entered.connect(_on_area_entered) + # This call updates the health bar to match the health variable when the + # game starts. + set_health(health) + + +func _process(delta: float) -> void: + var direction := Vector2(0, 0) + direction.x = Input.get_axis("move_left", "move_right") + direction.y = Input.get_axis("move_up", "move_down") + + if direction.length() > 1.0: + direction = direction.normalized() + + var desired_velocity := max_speed * direction + var steering := desired_velocity - velocity + velocity += steering * steering_factor * delta + position += velocity * delta + + if velocity.length() > 0.0: + get_node("Sprite2D").rotation = velocity.angle() + + +func set_health(new_health: int) -> void: + health = new_health + get_node("UI/HealthBar").value = health + + +func _on_area_entered(area_that_entered: Area2D) -> void: + set_health(health + 10) +``` + diff --git a/MyObsidianVault/Pasted image 20240320113513.png b/MyObsidianVault/Pasted image 20240320113513.png new file mode 100644 index 0000000..af7c432 Binary files /dev/null and b/MyObsidianVault/Pasted image 20240320113513.png differ diff --git a/MyObsidianVault/Pasted image 20240320114003.png b/MyObsidianVault/Pasted image 20240320114003.png new file mode 100644 index 0000000..2481c2a Binary files /dev/null and b/MyObsidianVault/Pasted image 20240320114003.png differ diff --git a/MyObsidianVault/Untitled.canvas b/MyObsidianVault/Untitled.canvas new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/MyObsidianVault/Untitled.canvas @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/MyObsidianVault/WebDev/Devilbox/start devilbox environment.md b/MyObsidianVault/WebDev/Devilbox/start devilbox environment.md new file mode 100644 index 0000000..74396cb --- /dev/null +++ b/MyObsidianVault/WebDev/Devilbox/start devilbox environment.md @@ -0,0 +1,2 @@ +docker-compose up -d +./shell.sh \ No newline at end of file diff --git a/MyObsidianVault/Pasted image 20240306100043.png b/MyObsidianVault/_images/Pasted image 20240306100043.png similarity index 100% rename from MyObsidianVault/Pasted image 20240306100043.png rename to MyObsidianVault/_images/Pasted image 20240306100043.png