forked from team-sg/hero-mark-2
create rolling fiend
This commit is contained in:
parent
1bd6fb04a1
commit
dcca66620e
4 changed files with 110 additions and 0 deletions
53
objects/enemy/rolling_fiend.tscn
Normal file
53
objects/enemy/rolling_fiend.tscn
Normal file
|
@ -0,0 +1,53 @@
|
|||
[gd_scene load_steps=8 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]
|
||||
|
||||
[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 )
|
||||
move_speed = 50.0
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
|
||||
frames = SubResource( 3 )
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." index="1"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
rotation = -0.020475
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="Raycasts" type="Node2D" parent="." index="2"]
|
||||
|
||||
[node name="WallCast" type="RayCast2D" parent="Raycasts" index="0"]
|
||||
position = Vector2( -8, 8 )
|
||||
enabled = true
|
||||
cast_to = Vector2( 0, -16 )
|
||||
|
||||
[node name="FloorCast" type="RayCast2D" parent="Raycasts" index="1"]
|
||||
position = Vector2( -8, 9 )
|
||||
enabled = true
|
||||
cast_to = Vector2( 16, 0 )
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Area2D_area_entered"]
|
Loading…
Add table
Add a link
Reference in a new issue