"Fixed" my editor bug and fixed arrow facing right when shot to the left

This commit is contained in:
RealMelwei 2025-09-20 01:15:57 +02:00
parent c314000857
commit 102fd4f34a
4 changed files with 49 additions and 1 deletions

View file

@ -13,4 +13,6 @@ func activate():
arrow.position = player.position
arrow.rotation = player.rotation
arrow.direction = player.earth_aligner.global_from_local(Vector2(player.facing, 0))
if(player.facing == -1):
arrow.get_node("Sprite2D").scale.x = - arrow.get_node("Sprite2D").scale.x
$SoundBowRelease.play()

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=13 format=3 uid="uid://cxo6bq26huau7"]
[gd_scene load_steps=14 format=3 uid="uid://cxo6bq26huau7"]
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
[ext_resource type="Texture2D" uid="uid://d3fpq76anm4t7" path="res://world/Background Prototype/Background prototype.png" id="3_kek77"]
[ext_resource type="PackedScene" uid="uid://jjoyj1ldafkf" path="res://world/earth.tscn" id="3_lquwl"]
[ext_resource type="Script" uid="uid://colvx6wq0e8n7" path="res://world/building_generator.gd" id="4_1bvp3"]
[ext_resource type="PackedScene" uid="uid://snvs7fty1l5a" path="res://ui/initial_text/initial_text.tscn" id="4_dg77c"]
[ext_resource type="Texture2D" uid="uid://c6bd4kakb1tr3" path="res://utils/empty.png" id="4_ycdy4"]
[ext_resource type="PackedScene" uid="uid://73g8y37skebh" path="res://ui/item_ui/item_ui.tscn" id="6_4c57u"]
[ext_resource type="PackedScene" uid="uid://cjsrtswk4vgf2" path="res://ui/healthbar/healthbar.tscn" id="6_7mycd"]
[ext_resource type="PackedScene" uid="uid://dpdn2php3ydsv" path="res://ui/death_screen/death_screen.tscn" id="7_5vw27"]
@ -41,6 +42,11 @@ autostart = true
[node name="UIOverlay" type="CanvasLayer" parent="."]
[node name="TextureRect" type="TextureRect" parent="UIOverlay"]
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("4_ycdy4")
[node name="InitialText" parent="UIOverlay" instance=ExtResource("4_dg77c")]
[node name="Healthbar" parent="UIOverlay" instance=ExtResource("6_7mycd")]

BIN
utils/empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

40
utils/empty.png.import Normal file
View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c6bd4kakb1tr3"
path="res://.godot/imported/empty.png-00c5c0f7757ec52809099cf633300943.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://utils/empty.png"
dest_files=["res://.godot/imported/empty.png-00c5c0f7757ec52809099cf633300943.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