Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/third_party/tiny-swords-non-cc0/Deco/Signs/Sign1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cq5l1xle30ch7"
path="res://.godot/imported/Sign1.png-f6a541d1da27150aa1a6d62f695642f9.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/third_party/tiny-swords-non-cc0/Deco/Signs/Sign1.png"
dest_files=["res://.godot/imported/Sign1.png-f6a541d1da27150aa1a6d62f695642f9.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
2 changes: 1 addition & 1 deletion assets/third_party/tiny-swords/Deco/17.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://cq5l1xle30ch7"
uid="uid://1f2j6h8v3hiy"
path="res://.godot/imported/17.png-2deed67ffd774577b8b55c82918b62d3.ctex"
metadata={
"vram_texture": false
Expand Down
12 changes: 11 additions & 1 deletion scenes/game_elements/props/sign/components/sign.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
@tool
extends Node2D

enum Frame {
NON_DIRECTIONAL = 0,
LEFT_AND_RIGHT = 1,
}

@export var direction: Enums.LookAtSide = Enums.LookAtSide.LEFT:
set(a_direction):
direction = a_direction
Expand All @@ -27,7 +32,12 @@ func _ready() -> void:


func update_appearance() -> void:
$Appearance.flip_h = direction == Enums.LookAtSide.RIGHT
if direction == Enums.LookAtSide.UNSPECIFIED:
%Appearance.frame = Frame.NON_DIRECTIONAL
%Appearance.flip_h = false
else:
%Appearance.frame = Frame.LEFT_AND_RIGHT
%Appearance.flip_h = direction == Enums.LookAtSide.RIGHT


func _on_area_2d_body_entered(_body: Node2D) -> void:
Expand Down
5 changes: 4 additions & 1 deletion scenes/game_elements/props/sign/sign.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene format=3 uid="uid://covsdqqsd6rsy"]

[ext_resource type="Script" uid="uid://o54tdc374nxc" path="res://scenes/game_elements/props/sign/components/sign.gd" id="1_cb2ey"]
[ext_resource type="Texture2D" uid="uid://cq5l1xle30ch7" path="res://assets/third_party/tiny-swords/Deco/17.png" id="2_85li6"]
[ext_resource type="Texture2D" uid="uid://cq5l1xle30ch7" path="res://assets/third_party/tiny-swords-non-cc0/Deco/Signs/Sign1.png" id="2_85li6"]
[ext_resource type="FontFile" uid="uid://b0tjcgrk504qg" path="res://assets/third_party/fonts/jersey/Jersey10-Regular.ttf" id="3_1ap0m"]
[ext_resource type="Material" uid="uid://b41j6upvxttw3" path="res://scenes/ui_elements/components/unshaded_material.tres" id="3_7odj1"]
[ext_resource type="Texture2D" uid="uid://b5ooaiyxdrp6a" path="res://scenes/game_elements/components/light_texture_256x256.tres" id="4_c8ong"]
Expand All @@ -18,8 +18,11 @@ radius = 80.0
script = ExtResource("1_cb2ey")

[node name="Appearance" type="Sprite2D" parent="." unique_id=1364985273]
unique_name_in_owner = true
texture = ExtResource("2_85li6")
offset = Vector2(0, -30)
hframes = 2
frame = 1

[node name="Collider" type="StaticBody2D" parent="." unique_id=882843758]
collision_layer = 16
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene format=3 uid="uid://ccoqpcy371psq"]

[ext_resource type="Script" uid="uid://o54tdc374nxc" path="res://scenes/game_elements/props/sign/components/sign.gd" id="1_onayf"]
[ext_resource type="Texture2D" uid="uid://cq5l1xle30ch7" path="res://assets/third_party/tiny-swords/Deco/17.png" id="2_cl2dx"]
[ext_resource type="Texture2D" uid="uid://cq5l1xle30ch7" path="res://assets/third_party/tiny-swords-non-cc0/Deco/Signs/Sign1.png" id="2_cl2dx"]
[ext_resource type="FontFile" uid="uid://b0tjcgrk504qg" path="res://assets/third_party/fonts/jersey/Jersey10-Regular.ttf" id="3_s8nls"]

[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_cb2ey"]
Expand All @@ -17,6 +17,8 @@ script = ExtResource("1_onayf")
[node name="Appearance" type="Sprite2D" parent="." unique_id=1240587292]
texture = ExtResource("2_cl2dx")
offset = Vector2(0, -30)
hframes = 2
frame = 1

[node name="Collider" type="StaticBody2D" parent="." unique_id=928850480]
collision_layer = 16
Expand Down