godot-shooter / asteroids / files / actors / Enemy.tscn
Branch asteroids · default branch · all branches
Enemy.tscn
3dea036b 2024-12-23 Pavel Safronov | 1 | [gd_scene load_steps=13 format=2] |
b856550a 2023-10-30 Pavel Safronov | 2 | |
16938031 2023-11-17 Pavel Safronov | 3 | [ext_resource path="res://effects/Trails.tscn" type="PackedScene" id=2] |
| 4 | [ext_resource path="res://actors/Enemy.gd" type="Script" id=3] | |
| 5 | [ext_resource path="res://assets/kenney_simple-space/PNG/Default/enemy_A.png" type="Texture" id=4] | |
| 6 | [ext_resource path="res://assets/kenney_crosshair-pack/PNG/White Retina/crosshair041.png" type="Texture" id=5] | |
04130db8 2023-11-07 Pavel Safronov | 7 | |
| 8 | [sub_resource type="Gradient" id=4] | |
| 9 | colors = PoolColorArray( 0, 0, 0, 0, 1, 0, 0, 1 ) | |
b856550a 2023-10-30 Pavel Safronov | 10 | |
8adb41dc 2023-11-19 Pavel Safronov | 11 | [sub_resource type="StyleBoxFlat" id=5] |
| 12 | bg_color = Color( 1, 1, 1, 1 ) | |
| 13 | ||
| 14 | [sub_resource type="StyleBoxFlat" id=6] | |
| 15 | bg_color = Color( 0.211765, 0.211765, 0.211765, 1 ) | |
| 16 | ||
cf2013fa 2023-11-02 Pavel Safronov | 17 | [sub_resource type="Animation" id=1] |
adab6dc8 2023-11-02 Pavel Safronov | 18 | length = 3.0 |
969fd5af 2023-11-06 Pavel Safronov | 19 | |
539576dd 2023-11-07 Pavel Safronov | 20 | [sub_resource type="Animation" id=3] |
| 21 | resource_name = "fade_in" | |
| 22 | tracks/0/type = "value" | |
| 23 | tracks/0/path = NodePath(".:modulate") | |
| 24 | tracks/0/interp = 1 | |
| 25 | tracks/0/loop_wrap = true | |
| 26 | tracks/0/imported = false | |
| 27 | tracks/0/enabled = true | |
| 28 | tracks/0/keys = { | |
023ec2fb 2023-11-29 Pavel Safronov | 29 | "times": PoolRealArray( 0, 1 ), |
539576dd 2023-11-07 Pavel Safronov | 30 | "transitions": PoolRealArray( 1, 1 ), |
| 31 | "update": 0, | |
| 32 | "values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ] | |
| 33 | } | |
| 34 | tracks/1/type = "value" | |
| 35 | tracks/1/path = NodePath(".:scale") | |
| 36 | tracks/1/interp = 1 | |
| 37 | tracks/1/loop_wrap = true | |
| 38 | tracks/1/imported = false | |
| 39 | tracks/1/enabled = true | |
| 40 | tracks/1/keys = { | |
023ec2fb 2023-11-29 Pavel Safronov | 41 | "times": PoolRealArray( -0.2, 1 ), |
539576dd 2023-11-07 Pavel Safronov | 42 | "transitions": PoolRealArray( 1, 1 ), |
| 43 | "update": 0, | |
| 44 | "values": [ Vector2( 0.01, 0.01 ), Vector2( 1, 1 ) ] | |
| 45 | } | |
| 46 | ||
969fd5af 2023-11-06 Pavel Safronov | 47 | [sub_resource type="Animation" id=2] |
| 48 | resource_name = "fade_out" | |
04130db8 2023-11-07 Pavel Safronov | 49 | length = 3.0 |
adab6dc8 2023-11-02 Pavel Safronov | 50 | tracks/0/type = "value" |
| 51 | tracks/0/path = NodePath(".:modulate") | |
cf2013fa 2023-11-02 Pavel Safronov | 52 | tracks/0/interp = 1 |
| 53 | tracks/0/loop_wrap = true | |
| 54 | tracks/0/imported = false | |
| 55 | tracks/0/enabled = true | |
| 56 | tracks/0/keys = { | |
04130db8 2023-11-07 Pavel Safronov | 57 | "times": PoolRealArray( 0, 3 ), |
adab6dc8 2023-11-02 Pavel Safronov | 58 | "transitions": PoolRealArray( 1, 1 ), |
| 59 | "update": 0, | |
| 60 | "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] | |
cf2013fa 2023-11-02 Pavel Safronov | 61 | } |
adab6dc8 2023-11-02 Pavel Safronov | 62 | tracks/1/type = "method" |
| 63 | tracks/1/path = NodePath(".") | |
cf2013fa 2023-11-02 Pavel Safronov | 64 | tracks/1/interp = 1 |
| 65 | tracks/1/loop_wrap = true | |
| 66 | tracks/1/imported = false | |
| 67 | tracks/1/enabled = true | |
| 68 | tracks/1/keys = { | |
04130db8 2023-11-07 Pavel Safronov | 69 | "times": PoolRealArray( 3 ), |
cf2013fa 2023-11-02 Pavel Safronov | 70 | "transitions": PoolRealArray( 1 ), |
adab6dc8 2023-11-02 Pavel Safronov | 71 | "values": [ { |
| 72 | "args": [ ], | |
969fd5af 2023-11-06 Pavel Safronov | 73 | "method": "remove_thyself" |
adab6dc8 2023-11-02 Pavel Safronov | 74 | } ] |
cf2013fa 2023-11-02 Pavel Safronov | 75 | } |
04130db8 2023-11-07 Pavel Safronov | 76 | tracks/2/type = "value" |
8adb41dc 2023-11-19 Pavel Safronov | 77 | tracks/2/path = NodePath("Graphics/Alive/Sprite/Trails:alpha") |
04130db8 2023-11-07 Pavel Safronov | 78 | tracks/2/interp = 1 |
| 79 | tracks/2/loop_wrap = true | |
| 80 | tracks/2/imported = false | |
| 81 | tracks/2/enabled = true | |
| 82 | tracks/2/keys = { | |
| 83 | "times": PoolRealArray( 0, 3 ), | |
| 84 | "transitions": PoolRealArray( 1, 1 ), | |
| 85 | "update": 0, | |
| 86 | "values": [ 1.0, 0.0 ] | |
| 87 | } | |
cf2013fa 2023-11-02 Pavel Safronov | 88 | |
3dea036b 2024-12-23 Pavel Safronov | 89 | [sub_resource type="Gradient" id=7] |
| 90 | colors = PoolColorArray( 1, 0, 0, 1, 1, 0, 0, 0 ) | |
| 91 | ||
| 92 | [sub_resource type="GradientTexture" id=8] | |
| 93 | gradient = SubResource( 7 ) | |
| 94 | ||
b856550a 2023-10-30 Pavel Safronov | 95 | [node name="Enemy" type="KinematicBody2D"] |
61fbb9f6 2023-11-09 Pavel Safronov | 96 | z_index = 10 |
9c3981ff 2023-11-14 Pavel Safronov | 97 | collision_layer = 2 |
023ec2fb 2023-11-29 Pavel Safronov | 98 | collision_mask = 11 |
16938031 2023-11-17 Pavel Safronov | 99 | script = ExtResource( 3 ) |
b856550a 2023-10-30 Pavel Safronov | 100 | |
| 101 | [node name="Graphics" type="Node2D" parent="."] | |
| 102 | ||
8adb41dc 2023-11-19 Pavel Safronov | 103 | [node name="Alive" type="Node2D" parent="Graphics"] |
614e7fb1 2023-10-31 Pavel Safronov | 104 | |
8adb41dc 2023-11-19 Pavel Safronov | 105 | [node name="Sprite" type="Sprite" parent="Graphics/Alive"] |
| 106 | modulate = Color( 1, 0.470588, 0, 1 ) | |
| 107 | texture = ExtResource( 4 ) | |
614e7fb1 2023-10-31 Pavel Safronov | 108 | |
8adb41dc 2023-11-19 Pavel Safronov | 109 | [node name="Target" type="Sprite" parent="Graphics/Alive/Sprite"] |
6ad40cea 2023-12-01 Pavel Safronov | 110 | modulate = Color( 1, 0, 0, 0.643137 ) |
16938031 2023-11-17 Pavel Safronov | 111 | texture = ExtResource( 5 ) |
1d4ba5a6 2023-11-02 Pavel Safronov | 112 | |
8adb41dc 2023-11-19 Pavel Safronov | 113 | [node name="Trails" parent="Graphics/Alive/Sprite" instance=ExtResource( 2 )] |
04130db8 2023-11-07 Pavel Safronov | 114 | gradient = SubResource( 4 ) |
| 115 | ||
8adb41dc 2023-11-19 Pavel Safronov | 116 | [node name="Container" type="Node2D" parent="Graphics/Alive"] |
| 117 | ||
| 118 | [node name="ProgressBar" type="ProgressBar" parent="Graphics/Alive/Container"] | |
| 119 | margin_left = -50.0 | |
| 120 | margin_top = 45.0 | |
| 121 | margin_right = 50.0 | |
2b4497bb 2023-11-27 Pavel Safronov | 122 | margin_bottom = 50.0 |
| 123 | rect_min_size = Vector2( 100, 5 ) | |
8adb41dc 2023-11-19 Pavel Safronov | 124 | custom_styles/fg = SubResource( 5 ) |
| 125 | custom_styles/bg = SubResource( 6 ) | |
| 126 | value = 30.0 | |
| 127 | percent_visible = false | |
| 128 | ||
cf2013fa 2023-11-02 Pavel Safronov | 129 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] |
| 130 | anims/RESET = SubResource( 1 ) | |
539576dd 2023-11-07 Pavel Safronov | 131 | anims/fade_in = SubResource( 3 ) |
cf2013fa 2023-11-02 Pavel Safronov | 132 | anims/fade_out = SubResource( 2 ) |
| 133 | ||
| 134 | [node name="DamagePoints" type="Node2D" parent="."] | |
8adb41dc 2023-11-19 Pavel Safronov | 135 | visible = false |
cf2013fa 2023-11-02 Pavel Safronov | 136 | |
| 137 | [node name="Position2D" type="Position2D" parent="DamagePoints"] | |
| 138 | position = Vector2( -16, 16 ) | |
| 139 | ||
| 140 | [node name="Position2D4" type="Position2D" parent="DamagePoints"] | |
| 141 | position = Vector2( 0, -13 ) | |
| 142 | ||
| 143 | [node name="Position2D2" type="Position2D" parent="DamagePoints"] | |
| 144 | position = Vector2( 16, 16 ) | |
b856550a 2023-10-30 Pavel Safronov | 145 | |
115aa5d1 2023-11-07 Pavel Safronov | 146 | [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] |
| 147 | polygon = PoolVector2Array( 0, -23, -7, 5, -12, 9, -19, 9, -23, 14, -23, 19, -19, 23, -14, 23, -9, 19, -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 ) | |
8adb41dc 2023-11-19 Pavel Safronov | 148 | |
| 149 | [node name="DamageObjects" type="Node2D" parent="."] | |
023ec2fb 2023-11-29 Pavel Safronov | 150 | |
| 151 | [node name="NavigationAgent2D" type="NavigationAgent2D" parent="."] | |
50d0dc8b 2023-12-21 Pavel Safronov | 152 | path_desired_distance = 10.0 |
6ad40cea 2023-12-01 Pavel Safronov | 153 | navigation_layers = 3 |
| 154 | avoidance_enabled = true | |
50d0dc8b 2023-12-21 Pavel Safronov | 155 | radius = 40.0 |
| 156 | max_neighbors = 20 | |
| 157 | time_horizon = 30.0 | |
6ad40cea 2023-12-01 Pavel Safronov | 158 | max_speed = 50.0 |
3dea036b 2024-12-23 Pavel Safronov | 159 | |
| 160 | [node name="ViewconePolygon2D" type="Polygon2D" parent="."] | |
| 161 | texture = SubResource( 8 ) | |
| 162 | texture_scale = Vector2( 7, 1 ) | |
| 163 | texture_rotation_degrees = 90.0 | |
| 164 | polygon = PoolVector2Array( -1, 0, -182, -330, 165, -330 ) |