Import test project as example

TODO: update gitlab-ci template to also use the test-project
This commit is contained in:
abarichello
2020-05-18 16:17:43 -03:00
parent 3e18735be5
commit 9fd1c3aee0
50 changed files with 2453 additions and 16 deletions

22
test-project/scripts/Base.gd Executable file
View File

@@ -0,0 +1,22 @@
extends "res://scripts/ColoredEntity.gd"
const FULL_HEALTH: int = 3
var health: int = self.FULL_HEALTH
func _ready():
self.highlight()
func hit() -> void:
if health > 1:
self.health -= 1
else:
self.dead()
func dead() -> void:
pass
# --- Signals ---
func _on_Body_body_entered(body: Node):
body.queue_free()
self.hit()