forked from team-sg/hero-mark-2
made launch rigid more generic
This commit is contained in:
parent
65a4fd8742
commit
40e10663d6
7 changed files with 158 additions and 19 deletions
132
objects/enemy/tin_die.tscn
Normal file
132
objects/enemy/tin_die.tscn
Normal file
|
@ -0,0 +1,132 @@
|
|||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/enemy/explosion_small.png" type="Texture" id=1]
|
||||
[ext_resource path="res://objects/enemy/tin_die.gd" type="Script" id=2]
|
||||
[ext_resource path="res://graphics/enemy/tin.png" type="Texture" id=3]
|
||||
[ext_resource path="res://scripts/launch_rigid.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 80, 0, 16, 16 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=7]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
|
||||
"loop": false,
|
||||
"name": "default",
|
||||
"speed": 20.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=8]
|
||||
extents = Vector2( 2, 2 )
|
||||
|
||||
[node name="TinDie" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 7 )
|
||||
|
||||
[node name="Topleft" type="RigidBody2D" parent="."]
|
||||
mass = 2.0
|
||||
script = ExtResource( 4 )
|
||||
impulse_max = 200
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Topleft"]
|
||||
position = Vector2( -2, -2 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 2
|
||||
vframes = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Topleft"]
|
||||
position = Vector2( -2, -2 )
|
||||
shape = SubResource( 8 )
|
||||
|
||||
[node name="Timer" type="Timer" parent="Topleft"]
|
||||
wait_time = 5.0
|
||||
autostart = true
|
||||
|
||||
[node name="TopRight" type="RigidBody2D" parent="."]
|
||||
mass = 2.0
|
||||
script = ExtResource( 4 )
|
||||
impulse_max = 200
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="TopRight"]
|
||||
position = Vector2( 3, -2 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 2
|
||||
vframes = 2
|
||||
frame = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TopRight"]
|
||||
position = Vector2( 2, -2 )
|
||||
shape = SubResource( 8 )
|
||||
|
||||
[node name="Timer" type="Timer" parent="TopRight"]
|
||||
wait_time = 5.3
|
||||
autostart = true
|
||||
|
||||
[node name="BottomLeft" type="RigidBody2D" parent="."]
|
||||
mass = 2.0
|
||||
script = ExtResource( 4 )
|
||||
impulse_max = 200
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="BottomLeft"]
|
||||
position = Vector2( -2, 3 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 2
|
||||
vframes = 2
|
||||
frame = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="BottomLeft"]
|
||||
position = Vector2( -2, 2 )
|
||||
shape = SubResource( 8 )
|
||||
|
||||
[node name="Timer" type="Timer" parent="BottomLeft"]
|
||||
wait_time = 5.5
|
||||
autostart = true
|
||||
|
||||
[node name="BottomRight" type="RigidBody2D" parent="."]
|
||||
position = Vector2( 3, 3 )
|
||||
mass = 2.0
|
||||
script = ExtResource( 4 )
|
||||
impulse_max = 200
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="BottomRight"]
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 2
|
||||
vframes = 2
|
||||
frame = 3
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="BottomRight"]
|
||||
position = Vector2( -1, -1 )
|
||||
shape = SubResource( 8 )
|
||||
|
||||
[node name="Timer" type="Timer" parent="BottomRight"]
|
||||
wait_time = 5.8
|
||||
autostart = true
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"]
|
||||
[connection signal="timeout" from="Topleft/Timer" to="Topleft" method="queue_free"]
|
||||
[connection signal="timeout" from="TopRight/Timer" to="TopRight" method="queue_free"]
|
||||
[connection signal="timeout" from="BottomLeft/Timer" to="BottomLeft" method="queue_free"]
|
||||
[connection signal="timeout" from="BottomRight/Timer" to="BottomRight" method="queue_free"]
|
Loading…
Add table
Add a link
Reference in a new issue