feat: add example splash item for inventory testing
This commit is contained in:
@@ -190,11 +190,17 @@ autowrap_mode = 3
|
||||
layer = 5
|
||||
|
||||
[node name="InventoryBackpack" parent="HUD" unique_id=-294967294 instance=ExtResource("9_backpack")]
|
||||
anchors_preset = 0
|
||||
anchor_top = 0.0
|
||||
anchor_bottom = 0.0
|
||||
offset_top = 0.0
|
||||
offset_bottom = 70.0
|
||||
grow_vertical = 1
|
||||
|
||||
[node name="InventoryOverlayLayer" type="CanvasLayer" parent="." unique_id=-294967293]
|
||||
layer = 10
|
||||
|
||||
[node name="InventoryOverlay" parent="InventoryOverlayLayer" unique_id=-294967292 instance=ExtResource("a_overlay")]
|
||||
|
||||
[connection signal="overlay_show_requested" from="HUD/InventoryBackpack" to="." method="_on_backpack_show_overlay"]
|
||||
[connection signal="overlay_hide_requested" from="HUD/InventoryBackpack" to="." method="_on_backpack_hide_overlay"]
|
||||
[connection signal="overlay_show_requested" from="HUD/InventoryBackpack" to="." method="_on_backpack_show_overlay"]
|
||||
|
||||
@@ -9,11 +9,11 @@ signal skip_action_requested
|
||||
|
||||
enum State { IDLE, OPEN, SELECTED, ACQUIRE, REMOVE }
|
||||
|
||||
var _state: State = State.IDLE
|
||||
var _animating: bool = false
|
||||
var _active_tween: Tween = null
|
||||
var _floating_item_color: Color = Color(1, 1, 1, 0)
|
||||
var _home_position: Vector2 = Vector2(0, 0)
|
||||
var _state: State = State.IDLE
|
||||
var _animating: bool = false
|
||||
var _active_tween: Tween = null
|
||||
var _floating_item_color: Color = Color(1, 1, 1, 0)
|
||||
var _home_position: Vector2 = Vector2(0, 0)
|
||||
|
||||
@onready var backpack_icon: ColorRect = $BackpackIcon
|
||||
@onready var floating_item: ColorRect = $FloatingItem
|
||||
|
||||
5
inventory/items/splash_item.tres
Normal file
5
inventory/items/splash_item.tres
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"item_id": "splash",
|
||||
"name": "Splash",
|
||||
"combination_category": "potion"
|
||||
}
|
||||
@@ -1,6 +1,16 @@
|
||||
extends Scene
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
var def = ItemDefinition.new()
|
||||
def.id = "splash"
|
||||
def.name = "Splash"
|
||||
def.combination_category = "potion"
|
||||
InventoryManager.register_item(def)
|
||||
give_item("splash")
|
||||
|
||||
|
||||
func _on_meadow_interacted() -> void:
|
||||
$kq4_002_meadow.default_script(self)
|
||||
|
||||
|
||||
3
splash.png
Normal file
3
splash.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c1f66a4950146f2127b1e1c306a7034a155f64cbdc77bddc1810928e4d9de164
|
||||
size 208
|
||||
40
splash.png.import
Normal file
40
splash.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxu3klicoldpv"
|
||||
path="res://.godot/imported/splash.png-929ed8a00b89ba36c51789452f874c77.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://splash.png"
|
||||
dest_files=["res://.godot/imported/splash.png-929ed8a00b89ba36c51789452f874c77.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
|
||||
Reference in New Issue
Block a user