godot-shooter / godot-4-testing / files / Enemy.tscn
Branch godot-4-testing · default branch · all branches
Enemy.tscn
b856550a 2023-10-30 Pavel Safronov | 1 | [gd_scene load_steps=3 format=2] |
| 2 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 3 | [ext_resource path="res://kenney_simple-space/PNG/Default/enemy_A.png" type="Texture2D" id=1] |
b856550a 2023-10-30 Pavel Safronov | 4 | [ext_resource path="res://Enemy.gd" type="Script" id=2] |
| 5 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 6 | [node name="Enemy" type="CharacterBody2D"] |
b856550a 2023-10-30 Pavel Safronov | 7 | script = ExtResource( 2 ) |
| 8 | ||
| 9 | [node name="Graphics" type="Node2D" parent="."] | |
| 10 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 11 | [node name="Alive" type="Sprite2D" parent="Graphics"] |
b856550a 2023-10-30 Pavel Safronov | 12 | texture = ExtResource( 1 ) |
| 13 | ||
614e7fb1 2023-10-31 Pavel Safronov | 14 | [node name="Container" type="Node2D" parent="Graphics/Alive"] |
| 15 | ||
| 16 | [node name="HealthLabel" type="Label" parent="Graphics/Alive/Container"] | |
11a2e1d9 2023-10-31 Pavel Safronov | 17 | offset_left = -25.0 |
| 18 | offset_top = 37.0 | |
| 19 | offset_right = 25.0 | |
| 20 | offset_bottom = 51.0 | |
614e7fb1 2023-10-31 Pavel Safronov | 21 | text = "HEALTH" |
| 22 | ||
b856550a 2023-10-30 Pavel Safronov | 23 | [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] |
| 24 | visible = false | |
11a2e1d9 2023-10-31 Pavel Safronov | 25 | polygon = PackedVector2Array( 0, -23, -7, 5, -12, 9, -19, 9, -23, 14, -23, 19, -19, 23, -14, 23, -9, 18, -9, 14, -10, 12, -6, 9, 0, 15, 6, 9, 10, 12, 9, 14, 9, 19, 13, 23, 18, 23, 23, 18, 23, 14, 19, 10, 13, 10, 7, 5 ) |
b856550a 2023-10-30 Pavel Safronov | 26 | |
| 27 | [node name="RayCast2D" type="RayCast2D" parent="."] | |
11a2e1d9 2023-10-31 Pavel Safronov | 28 | target_position = Vector2( 0, -50 ) |