forked from team-sg/hero-mark-2
64 lines
1.8 KiB
Text
64 lines
1.8 KiB
Text
[gd_scene load_steps=10 format=2]
|
|
|
|
[ext_resource path="res://objects/enemy/enemy.tscn" type="PackedScene" id=1]
|
|
[ext_resource path="res://graphics/enemy/roller_fiend.png" type="Texture" id=2]
|
|
[ext_resource path="res://objects/enemy/rolling_fiend.gd" type="Script" id=3]
|
|
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=4]
|
|
|
|
[sub_resource type="ShaderMaterial" id=5]
|
|
shader = ExtResource( 4 )
|
|
shader_param/border_color = Color( 0, 0, 0, 1 )
|
|
shader_param/border_corners = false
|
|
|
|
[sub_resource type="AtlasTexture" id=1]
|
|
atlas = ExtResource( 2 )
|
|
region = Rect2( 0, 0, 16, 16 )
|
|
|
|
[sub_resource type="AtlasTexture" id=2]
|
|
atlas = ExtResource( 2 )
|
|
region = Rect2( 16, 0, 16, 16 )
|
|
|
|
[sub_resource type="SpriteFrames" id=3]
|
|
animations = [ {
|
|
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
|
|
"loop": true,
|
|
"name": "default",
|
|
"speed": 10.0
|
|
} ]
|
|
|
|
[sub_resource type="RectangleShape2D" id=4]
|
|
extents = Vector2( 4, 4 )
|
|
|
|
[node name="RollingFiend" instance=ExtResource( 1 )]
|
|
script = ExtResource( 3 )
|
|
score_for_killing = 40
|
|
move_speed = 50.0
|
|
|
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
|
|
material = SubResource( 5 )
|
|
position = Vector2( 0, 1 )
|
|
frames = SubResource( 3 )
|
|
frame = 1
|
|
playing = true
|
|
|
|
[node name="Hitbox" type="Area2D" parent="." index="1"]
|
|
position = Vector2( 0, 1 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
|
rotation = -0.020475
|
|
shape = SubResource( 4 )
|
|
|
|
[node name="Raycasts" type="Node2D" parent="." index="2"]
|
|
position = Vector2( 0, 1 )
|
|
|
|
[node name="WallCast" type="RayCast2D" parent="Raycasts" index="0"]
|
|
position = Vector2( -7, 7 )
|
|
enabled = true
|
|
cast_to = Vector2( 0, -11 )
|
|
|
|
[node name="FloorCast" type="RayCast2D" parent="Raycasts" index="1"]
|
|
position = Vector2( -7, 8 )
|
|
enabled = true
|
|
cast_to = Vector2( 11, 0 )
|
|
|
|
[connection signal="area_entered" from="Hitbox" to="." method="_on_Area2D_area_entered"]
|