forked from team-sg/hero-mark-2
127 lines
3.5 KiB
Text
127 lines
3.5 KiB
Text
[gd_scene load_steps=17 format=2]
|
|
|
|
[ext_resource path="res://objects/enemy/cop.gd" type="Script" id=1]
|
|
[ext_resource path="res://graphics/enemy/cop/cop_idle.png" type="Texture" id=2]
|
|
[ext_resource path="res://graphics/enemy/cop/cop_walk.png" type="Texture" id=3]
|
|
[ext_resource path="res://graphics/enemy/cop/cop_shoot.png" type="Texture" id=4]
|
|
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=5]
|
|
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=6]
|
|
|
|
[sub_resource type="ShaderMaterial" id=7]
|
|
shader = ExtResource( 5 )
|
|
shader_param/border_color = Color( 0, 0, 0, 1 )
|
|
shader_param/border_corners = true
|
|
|
|
[sub_resource type="AtlasTexture" id=1]
|
|
atlas = ExtResource( 2 )
|
|
region = Rect2( 0, 0, 20, 21 )
|
|
|
|
[sub_resource type="AtlasTexture" id=2]
|
|
atlas = ExtResource( 3 )
|
|
region = Rect2( 0, 0, 20, 21 )
|
|
|
|
[sub_resource type="AtlasTexture" id=3]
|
|
atlas = ExtResource( 3 )
|
|
region = Rect2( 20, 0, 20, 21 )
|
|
|
|
[sub_resource type="AtlasTexture" id=4]
|
|
atlas = ExtResource( 3 )
|
|
region = Rect2( 40, 0, 20, 21 )
|
|
|
|
[sub_resource type="AtlasTexture" id=5]
|
|
atlas = ExtResource( 3 )
|
|
region = Rect2( 60, 0, 20, 21 )
|
|
|
|
[sub_resource type="SpriteFrames" id=6]
|
|
animations = [ {
|
|
"frames": [ SubResource( 1 ) ],
|
|
"loop": false,
|
|
"name": "idle",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [ ExtResource( 4 ) ],
|
|
"loop": false,
|
|
"name": "shoot",
|
|
"speed": 1.0
|
|
}, {
|
|
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
|
|
"loop": true,
|
|
"name": "walk",
|
|
"speed": 5.0
|
|
} ]
|
|
|
|
[sub_resource type="RectangleShape2D" id=8]
|
|
extents = Vector2( 3, 8 )
|
|
|
|
[sub_resource type="Curve" id=9]
|
|
_data = [ Vector2( 0, 1 ), 0.0, -1.45746, 0, 0, Vector2( 1, 0 ), 0.00323196, 0.0, 0, 0 ]
|
|
|
|
[sub_resource type="Gradient" id=10]
|
|
offsets = PoolRealArray( 0, 0.515152 )
|
|
colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 0.290196, 1 )
|
|
|
|
[node name="Cop" type="Node2D"]
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
|
show_behind_parent = true
|
|
material = SubResource( 7 )
|
|
position = Vector2( 5, -2 )
|
|
frames = SubResource( 6 )
|
|
animation = "idle"
|
|
playing = true
|
|
|
|
[node name="ShootPosition" type="Position2D" parent="AnimatedSprite"]
|
|
unique_name_in_owner = true
|
|
position = Vector2( 7, 0.5 )
|
|
__meta__ = {
|
|
"_gizmo_extents_": 4.0
|
|
}
|
|
|
|
[node name="ShootCast" type="RayCast2D" parent="AnimatedSprite/ShootPosition"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
enabled = true
|
|
cast_to = Vector2( 256, 0 )
|
|
collision_mask = 8
|
|
collide_with_areas = true
|
|
|
|
[node name="GraphicsCast" type="RayCast2D" parent="AnimatedSprite/ShootPosition"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
cast_to = Vector2( 256, 0 )
|
|
collision_mask = 8
|
|
|
|
[node name="ShootLine" type="Line2D" parent="AnimatedSprite/ShootPosition"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
points = PoolVector2Array( 0, 0, 8, 0 )
|
|
width = 1.0
|
|
default_color = Color( 1, 1, 0.290196, 1 )
|
|
|
|
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
|
position = Vector2( 4, 0 )
|
|
shape = SubResource( 8 )
|
|
|
|
[node name="SparkParticles" type="CPUParticles2D" parent="."]
|
|
position = Vector2( 4, 0 )
|
|
emitting = false
|
|
amount = 16
|
|
lifetime = 0.5
|
|
one_shot = true
|
|
explosiveness = 1.0
|
|
texture = ExtResource( 6 )
|
|
spread = 180.0
|
|
gravity = Vector2( 0, 0 )
|
|
initial_velocity = 30.0
|
|
initial_velocity_random = 0.5
|
|
damping = 50.0
|
|
angle = 720.0
|
|
angle_random = 1.0
|
|
scale_amount = 0.5
|
|
scale_amount_curve = SubResource( 9 )
|
|
color_ramp = SubResource( 10 )
|
|
|
|
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|