tomato-dungeon

a game made in 1 day
git clone git://git.vgx.fr/tomato-dungeon
Log | Files | Refs | README

serpent.tscn (3543B)


      1 [gd_scene load_steps=22 format=2]
      2 
      3 [ext_resource path="res://icon.png" type="Texture" id=1]
      4 [ext_resource path="res://serpent.gd" type="Script" id=2]
      5 [ext_resource path="res://serpent_walk.png" type="Texture" id=3]
      6 [ext_resource path="res://serpent_die.png" type="Texture" id=4]
      7 [ext_resource path="res://serpent_att.png" type="Texture" id=5]
      8 [ext_resource path="res://hit.wav" type="AudioStream" id=6]
      9 [ext_resource path="res://attackserpent.wav" type="AudioStream" id=7]
     10 
     11 [sub_resource type="AtlasTexture" id=10]
     12 flags = 4
     13 atlas = ExtResource( 3 )
     14 region = Rect2( 0, 0, 32, 32 )
     15 
     16 [sub_resource type="AtlasTexture" id=11]
     17 flags = 4
     18 atlas = ExtResource( 3 )
     19 region = Rect2( 32, 0, 32, 32 )
     20 
     21 [sub_resource type="AtlasTexture" id=6]
     22 flags = 4
     23 atlas = ExtResource( 5 )
     24 region = Rect2( 0, 0, 32, 32 )
     25 
     26 [sub_resource type="AtlasTexture" id=7]
     27 flags = 4
     28 atlas = ExtResource( 5 )
     29 region = Rect2( 32, 0, 32, 32 )
     30 
     31 [sub_resource type="AtlasTexture" id=8]
     32 flags = 4
     33 atlas = ExtResource( 5 )
     34 region = Rect2( 64, 0, 32, 32 )
     35 
     36 [sub_resource type="AtlasTexture" id=9]
     37 flags = 4
     38 atlas = ExtResource( 5 )
     39 region = Rect2( 96, 0, 32, 32 )
     40 
     41 [sub_resource type="AtlasTexture" id=1]
     42 flags = 4
     43 atlas = ExtResource( 4 )
     44 region = Rect2( 0, 0, 32, 32 )
     45 
     46 [sub_resource type="AtlasTexture" id=2]
     47 flags = 4
     48 atlas = ExtResource( 4 )
     49 region = Rect2( 32, 0, 32, 32 )
     50 
     51 [sub_resource type="AtlasTexture" id=3]
     52 flags = 4
     53 atlas = ExtResource( 4 )
     54 region = Rect2( 64, 0, 32, 32 )
     55 
     56 [sub_resource type="AtlasTexture" id=4]
     57 flags = 4
     58 atlas = ExtResource( 4 )
     59 region = Rect2( 96, 0, 32, 32 )
     60 
     61 [sub_resource type="AtlasTexture" id=5]
     62 flags = 4
     63 atlas = ExtResource( 4 )
     64 region = Rect2( 128, 0, 32, 32 )
     65 
     66 [sub_resource type="SpriteFrames" id=12]
     67 animations = [ {
     68 "frames": [ SubResource( 10 ), SubResource( 11 ) ],
     69 "loop": true,
     70 "name": "walk",
     71 "speed": 5.0
     72 }, {
     73 "frames": [ SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ],
     74 "loop": true,
     75 "name": "attack",
     76 "speed": 5.0
     77 }, {
     78 "frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
     79 "loop": true,
     80 "name": "die",
     81 "speed": 5.0
     82 } ]
     83 
     84 [sub_resource type="CircleShape2D" id=13]
     85 radius = 9.0
     86 
     87 [sub_resource type="CapsuleShape2D" id=14]
     88 radius = 5.0
     89 height = 22.0
     90 
     91 [node name="serpent" type="Node2D" groups=["monstres"]]
     92 script = ExtResource( 2 )
     93 
     94 [node name="Sprite" type="AnimatedSprite" parent="."]
     95 frames = SubResource( 12 )
     96 animation = "attack"
     97 frame = 2
     98 
     99 [node name="AttackArea" type="Area2D" parent="Sprite"]
    100 
    101 [node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite/AttackArea"]
    102 position = Vector2( 9, 0 )
    103 shape = SubResource( 13 )
    104 
    105 [node name="HitArea" type="Area2D" parent="Sprite"]
    106 
    107 [node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite/HitArea"]
    108 rotation = 1.5708
    109 shape = SubResource( 14 )
    110 
    111 [node name="oldSprite" type="Sprite" parent="."]
    112 visible = false
    113 scale = Vector2( 0.46875, 0.46875 )
    114 texture = ExtResource( 1 )
    115 
    116 [node name="lifebar_bg" type="Polygon2D" parent="."]
    117 position = Vector2( -10, -6 )
    118 z_index = 1
    119 color = Color( 0.411765, 0.411765, 0.411765, 1 )
    120 polygon = PoolVector2Array( 0, -13, 0, -9, 21, -9, 21, -13 )
    121 
    122 [node name="lifebar" type="Polygon2D" parent="."]
    123 position = Vector2( -10, -12 )
    124 z_index = 1
    125 color = Color( 1, 0, 0, 1 )
    126 polygon = PoolVector2Array( 0, -7, 0, -3, 21, -3, 21, -7 )
    127 
    128 [node name="HitSound" type="AudioStreamPlayer2D" parent="."]
    129 stream = ExtResource( 6 )
    130 volume_db = 9.0
    131 pitch_scale = 4.0
    132 
    133 [node name="AttackSound" type="AudioStreamPlayer2D" parent="."]
    134 stream = ExtResource( 7 )
    135 volume_db = 4.0