-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed default cell size to 128 in the Godot settings, made it so th…
…at the artifacts disappear and emit a signal when then are entered
- Loading branch information
Showing
3 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends Area2D | ||
|
||
signal stolen | ||
|
||
func _on_Artifact_body_entered(body): | ||
$Sprite.visible = false | ||
emit_signal("stolen") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
[gd_scene load_steps=3 format=2] | ||
[gd_scene load_steps=4 format=2] | ||
|
||
[ext_resource path="res://assets/entities/Artefact Mirror.png" type="Texture" id=1] | ||
[ext_resource path="res://World/Artifact.gd" type="Script" id=2] | ||
|
||
[sub_resource type="CircleShape2D" id=1] | ||
radius = 16.0 | ||
|
||
[node name="Artifact" type="Area2D"] | ||
scale = Vector2( 2, 2 ) | ||
script = ExtResource( 2 ) | ||
|
||
[node name="Sprite" type="Sprite" parent="."] | ||
position = Vector2( 0, 8 ) | ||
texture = ExtResource( 1 ) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
shape = SubResource( 1 ) | ||
|
||
[connection signal="body_entered" from="." to="." method="_on_Artifact_body_entered"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters