added a button :D
This commit is contained in:
parent
215d930022
commit
34b447cff1
5 changed files with 64 additions and 1 deletions
29
objects/environment/switches/button.tscn
Normal file
29
objects/environment/switches/button.tscn
Normal file
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/switches/button.png" type="Texture" id=1]
|
||||
[ext_resource path="res://objects/environment/switches/button.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 2, 0.5 )
|
||||
|
||||
[node name="Button" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
type = "button"
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 4, 4 )
|
||||
texture = ExtResource( 1 )
|
||||
hframes = 2
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
|
||||
polygon = PoolVector2Array( 1, 7, 0, 8, 1, 8, 7, 8, 8, 8, 7, 7 )
|
||||
|
||||
[node name="ActivationArea" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ActivationArea"]
|
||||
position = Vector2( 4, 6.5 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="area_entered" from="ActivationArea" to="." method="_on_ActivationArea_area_entered"]
|
Loading…
Add table
Add a link
Reference in a new issue