Skip to content

Commit

Permalink
🔦 Animated torch
Browse files Browse the repository at this point in the history
  • Loading branch information
heytherewill committed Oct 2, 2023
1 parent 1c6e477 commit 0a1b786
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 4 deletions.
Binary file modified assets/images/dungeon.aseprite
Binary file not shown.
Binary file added scenes/room/dungeon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions scenes/room/dungeon.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/dungeon.png-6141411bbc2214856cc2875f407ea044.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://scenes/room/dungeon.png"
dest_files=[ "res://.import/dungeon.png-6141411bbc2214856cc2875f407ea044.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0
111 changes: 107 additions & 4 deletions scenes/room/room.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,97 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=11 format=2]

[ext_resource path="res://assets/images/dungeon.png" type="Texture" id=1]
[ext_resource path="res://scenes/room/dungeon.png" type="Texture" id=1]
[ext_resource path="res://scenes/room/Room.cs" type="Script" id=2]
[ext_resource path="res://assets/images/dungeon_floor.png" type="Texture" id=3]
[ext_resource path="res://assets/images/dungeon_doors.png" type="Texture" id=4]

[sub_resource type="StreamTexture" id=1]
load_path = "res://.import/dungeon.png-6141411bbc2214856cc2875f407ea044.stex"

[sub_resource type="AtlasTexture" id=2]
atlas = SubResource( 1 )
region = Rect2( 0, 0, 202, 118 )

[sub_resource type="AtlasTexture" id=3]
atlas = SubResource( 1 )
region = Rect2( 202, 0, 202, 118 )

[sub_resource type="AtlasTexture" id=4]
atlas = SubResource( 1 )
region = Rect2( 0, 118, 202, 118 )

[sub_resource type="SpriteFrames" id=5]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 3 ) ],
"loop": true,
"name": "default",
"speed": 5.0
} ]

[sub_resource type="Animation" id=6]
length = 0.8
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ ExtResource( 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = false
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 2 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:vframes")
tracks/2/interp = 1
tracks/2/loop_wrap = false
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 2 ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = false
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/4/type = "value"
tracks/4/path = NodePath(".:frame")
tracks/4/interp = 1
tracks/4/loop_wrap = false
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 0.0, 1.0, 2.0, 1.0 ]
}

[node name="Room" type="Node2D"]
script = ExtResource( 2 )

Expand All @@ -13,9 +100,25 @@ position = Vector2( 96, 54 )
z_index = -3
texture = ExtResource( 3 )

[node name="Background" type="Sprite" parent="."]
[node name="Background" type="AnimatedSprite" parent="."]
position = Vector2( 96, 54 )
texture = ExtResource( 1 )
frames = SubResource( 5 )
frame = 3
playing = true
__meta__ = {
"_aseprite_wizard_config_": {
"layer": "",
"o_ex_p": "",
"o_folder": "",
"o_name": "",
"only_visible": false,
"op_exp": false,
"source": "res://assets/images/dungeon.aseprite"
}
}

[node name="AnimationPlayer" type="AnimationPlayer" parent="Background"]
anims/default = SubResource( 6 )

[node name="Doors" type="Sprite" parent="."]
position = Vector2( 96, 54 )
Expand Down

0 comments on commit 0a1b786

Please sign in to comment.