mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 11:45:54 +00:00
Cheat gun recolor
This commit is contained in:
parent
dfe936461e
commit
2e01cd19e2
7 changed files with 54 additions and 11 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[ext_resource type="PackedScene" uid="uid://pemr2lrv3ylk" path="res://Scenes/HUD/Items/ying_yang_gun_huditem.tscn" id="1_i6xgq"]
|
||||
[ext_resource type="Resource" uid="uid://ckppo2seg313h" path="res://Resources/Weapons/Cheat_Gun.tres" id="2_0na1t"]
|
||||
[ext_resource type="Texture2D" uid="uid://61kfxc7k3do" path="res://Sprites/Items/Ying_Yang_Gun.png" id="2_5g5j1"]
|
||||
[ext_resource type="Texture2D" uid="uid://cwy7g861vnbj1" path="res://Sprites/Items/Cheat_Gun.png" id="2_0vddk"]
|
||||
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="3_i0e51"]
|
||||
|
||||
[resource]
|
||||
|
|
@ -18,6 +18,6 @@ PickupIfMaxed = true
|
|||
ConsumeOnUse = false
|
||||
UiType = 1
|
||||
Selectable = true
|
||||
InventorySprite = ExtResource("2_5g5j1")
|
||||
InventorySprite = ExtResource("2_0vddk")
|
||||
HudItemScene = ExtResource("1_i6xgq")
|
||||
DropScenePath = null
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[ext_resource type="Script" uid="uid://b3h7b30kerf60" path="res://Scripts/Interactables/ItemPickup.cs" id="1_vx8ix"]
|
||||
[ext_resource type="Resource" uid="uid://cfq121rs3bsu8" path="res://Resources/Items/Cheat_Gun_Item.tres" id="2_si1ac"]
|
||||
[ext_resource type="Texture2D" uid="uid://61kfxc7k3do" path="res://Sprites/Items/Ying_Yang_Gun.png" id="4_pj6iu"]
|
||||
[ext_resource type="Texture2D" uid="uid://cwy7g861vnbj1" path="res://Sprites/Items/Cheat_Gun.png" id="3_6qev1"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jtwy2"]
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ script = ExtResource("1_vx8ix")
|
|||
LootTable = [ExtResource("2_si1ac")]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("4_pj6iu")
|
||||
texture = ExtResource("3_6qev1")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_jtwy2")
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ SpawnMarkers = Dictionary[int, NodePath]({
|
|||
2: NodePath("Factory Tilemaps/LevelProps/BossDebugTeleporterDestination"),
|
||||
255: NodePath("Factory Tilemaps/Debug Room/DebugRoomStartPosition")
|
||||
})
|
||||
StartingEquipment = Array[ExtResource("6_8tdlb")]([ExtResource("4_swym2"), ExtResource("5_nqier")])
|
||||
StartingEquipment = [ExtResource("4_swym2"), ExtResource("5_nqier")]
|
||||
MapStartData = SubResource("Resource_6sau4")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
|
|
@ -987,7 +987,7 @@ position = Vector2(-2000, -736)
|
|||
[node name="ControlPad8" parent="Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("12_hfkf1")]
|
||||
position = Vector2(-2027, -735)
|
||||
Targets = [NodePath("../HorizontalForceField")]
|
||||
Requirements = Array[ExtResource("6_8tdlb")]([ExtResource("84_ma1ta")])
|
||||
Requirements = [ExtResource("84_ma1ta")]
|
||||
|
||||
[node name="Ammo6" parent="Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-872, -220)
|
||||
|
|
|
|||
|
|
@ -24,11 +24,7 @@ public partial class WeaponAmmoCounter : Container
|
|||
|
||||
Icon.Texture = item.InventorySprite;
|
||||
|
||||
InventoryManager.Instance.LoadedAmmoChanged += (weaponKey, count) =>
|
||||
{
|
||||
if (weaponKey != Item.WeaponData.ItemKey) return;
|
||||
LoadedAmmoLabel.Text = count.ToString();
|
||||
};
|
||||
InventoryManager.Instance.LoadedAmmoChanged += OnInstanceOnLoadedAmmoChanged;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(item.WeaponData.AmmoKey))
|
||||
{
|
||||
|
|
@ -52,6 +48,12 @@ public partial class WeaponAmmoCounter : Container
|
|||
InventoryManager.Instance.TotalAmmoChanged += OnInstanceOnTotalAmmoChanged;
|
||||
}
|
||||
|
||||
private void OnInstanceOnLoadedAmmoChanged(StringName weaponKey, int count)
|
||||
{
|
||||
if (weaponKey != Item.WeaponData.ItemKey) return;
|
||||
LoadedAmmoLabel.Text = count.ToString();
|
||||
}
|
||||
|
||||
private void OnInstanceOnTotalAmmoChanged(StringName ammoKey, int count)
|
||||
{
|
||||
if (ammoKey != Item.WeaponData.AmmoKey) return;
|
||||
|
|
@ -60,6 +62,7 @@ public partial class WeaponAmmoCounter : Container
|
|||
|
||||
public void Delete()
|
||||
{
|
||||
InventoryManager.Instance.LoadedAmmoChanged -= OnInstanceOnLoadedAmmoChanged;
|
||||
InventoryManager.Instance.TotalAmmoChanged -= OnInstanceOnTotalAmmoChanged;
|
||||
QueueFree();
|
||||
}
|
||||
|
|
|
|||
BIN
Sprites/Items/Cheat_Gun.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/Items/Cheat_Gun.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/Items/Cheat_Gun.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Items/Cheat_Gun.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Items/Cheat_Gun.png.import
Normal file
34
Sprites/Items/Cheat_Gun.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cwy7g861vnbj1"
|
||||
path="res://.godot/imported/Cheat_Gun.png-9fa49a62b406d6d9f3d703738c0dc5c7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Items/Cheat_Gun.png"
|
||||
dest_files=["res://.godot/imported/Cheat_Gun.png-9fa49a62b406d6d9f3d703738c0dc5c7.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue