mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-16 02:43:46 +00:00
Ammo UI system
This commit is contained in:
parent
70c514f1a9
commit
5eb7b578bc
22 changed files with 238 additions and 87 deletions
|
|
@ -1,9 +1,8 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://dkwi1hu1bixoe"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dkwi1hu1bixoe"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Hud.cs" id="1_m0hb0"]
|
||||
[ext_resource type="FontFile" uid="uid://ccm3u37q1hvux" path="res://fonts/Xolonium-Regular.ttf" id="2_0xmx2"]
|
||||
[ext_resource type="Texture2D" uid="uid://dde36pgb8fbwc" path="res://Sprites/selector_big.png" id="3_hee3i"]
|
||||
[ext_resource type="PackedScene" uid="uid://cicthr1v5v4s2" path="res://Scenes/HUD/Items/icicle_gun.tscn" id="4_m333p"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h626b"]
|
||||
atlas = ExtResource("3_hee3i")
|
||||
|
|
@ -81,14 +80,3 @@ text = "100/100"
|
|||
|
||||
[node name="ItemsContainer" type="VBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ItemsContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="IcicleGun" parent="VBoxContainer/ItemsContainer/HBoxContainer" instance=ExtResource("4_m333p")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/ItemsContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 10
|
||||
text = "100/300"
|
||||
|
|
|
|||
7
Scenes/HUD/Items/ice_shotgun_huditem.tscn
Normal file
7
Scenes/HUD/Items/ice_shotgun_huditem.tscn
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bqb3gbnrkqewt"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b46usr10jhmev" path="res://Sprites/Items/Ice_Shotgun.png" id="1_1dd2l"]
|
||||
|
||||
[node name="IceShotgun" type="TextureRect"]
|
||||
texture = ExtResource("1_1dd2l")
|
||||
stretch_mode = 2
|
||||
|
|
@ -21,7 +21,7 @@ public partial class Interactable : Area2D
|
|||
{
|
||||
if (Requirements.Any())
|
||||
{
|
||||
if (_inventoryManager.HasItems(Requirements.Select(x => x.Item).ToList()))
|
||||
if (_inventoryManager.HasItems(Requirements.Select(x => x.ItemKey).ToList()))
|
||||
{
|
||||
GD.Print($"Requirements for activation of {this.Name} successfully met: {string.Join(",", Requirements.Select(x => x.Item))} ");
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://q7hau0tl3vsr"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://q7hau0tl3vsr"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://duwiasewxvcb5" path="res://Sprites/Items/Icicle_Gun.png" id="1_exv8g"]
|
||||
[ext_resource type="Script" path="res://Scripts/Interactables/ItemPickup.cs" id="1_rdvi1"]
|
||||
[ext_resource type="Resource" uid="uid://cs3ihltcn2166" path="res://Resources/Items/IcicleGun.tres" id="2_6qt07"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jtwy2"]
|
||||
|
||||
[node name="IcicleGun" type="Area2D"]
|
||||
script = ExtResource("1_rdvi1")
|
||||
LootTable = [ExtResource("2_6qt07")]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_exv8g")
|
||||
|
|
|
|||
|
|
@ -5,5 +5,3 @@
|
|||
|
||||
[node name="EnemyWeapon" instance=ExtResource("1_60orr")]
|
||||
BulletScene = ExtResource("2_dyoou")
|
||||
BulletCapacity = 4
|
||||
BulletSpeed = 50.0
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ radius = 17.2627
|
|||
[sub_resource type="CircleShape2D" id="CircleShape2D_e6woi"]
|
||||
radius = 1.0
|
||||
|
||||
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("Muzzle", "EquippedWeapon") groups=["Destroyable", "player"]]
|
||||
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("Muzzle") groups=["Destroyable", "player"]]
|
||||
y_sort_enabled = true
|
||||
collision_layer = 2
|
||||
collision_mask = 99
|
||||
|
|
@ -154,7 +154,6 @@ CrosshairDistance = 20.0
|
|||
SelectorScene = ExtResource("3_8wt6s")
|
||||
GameOverScene = "res://Scenes/GameOver.tscn"
|
||||
Muzzle = NodePath("Muzzle")
|
||||
EquippedWeapon = NodePath("Weapon")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
[gd_scene load_steps=40 format=4 uid="uid://bv451a8wgty4u"]
|
||||
[gd_scene load_steps=44 format=4 uid="uid://bv451a8wgty4u"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_8mh54"]
|
||||
[ext_resource type="PackedScene" uid="uid://crry0rgk7a8sm" path="res://Scenes/Weapons/BaseWeapon.tscn" id="3_2wlhc"]
|
||||
[ext_resource type="TileSet" uid="uid://6k28roiljylj" path="res://Tilesets/factory_tileset.tres" id="3_kgs2x"]
|
||||
[ext_resource type="Script" path="res://Scripts/TilemapAvoidance.cs" id="4_p1fl3"]
|
||||
[ext_resource type="PackedScene" uid="uid://rp4jhx0tuh24" path="res://Scenes/fragola.tscn" id="4_s7wq6"]
|
||||
[ext_resource type="Resource" uid="uid://ct1fa2huvy34n" path="res://Resources/Items/Ammo1.tres" id="4_swym2"]
|
||||
[ext_resource type="Resource" uid="uid://dau0s8ob7qnpc" path="res://Resources/Items/IceShotgun.tres" id="5_frf65"]
|
||||
[ext_resource type="Resource" uid="uid://cs3ihltcn2166" path="res://Resources/Items/IcicleGun.tres" id="5_nqier"]
|
||||
[ext_resource type="PackedScene" uid="uid://uaf5r6cd71hu" path="res://Scenes/Props/LargeTank.tscn" id="6_nkauc"]
|
||||
[ext_resource type="Script" path="res://Scenes/CameraController.gd" id="6_t8ide"]
|
||||
[ext_resource type="PackedScene" uid="uid://crmwuwhltmdq7" path="res://Scenes/Props/MediumTank.tscn" id="7_lmrl1"]
|
||||
|
|
@ -47,6 +51,8 @@ position = Vector2(38, 39)
|
|||
script = ExtResource("1_8tmoj")
|
||||
PlayerTemplate = ExtResource("2_8mh54")
|
||||
PlayerSpawnMarker = NodePath("PlayerStartPosition")
|
||||
WeaponTemplate = ExtResource("3_2wlhc")
|
||||
StartingEquipment = Array[Object]([ExtResource("4_swym2"), ExtResource("5_frf65"), ExtResource("5_nqier")])
|
||||
|
||||
[node name="Factory Tilemaps" type="Node2D" parent="."]
|
||||
|
||||
|
|
@ -333,3 +339,12 @@ _trackName = "computer2"
|
|||
|
||||
[node name="Ammo1" parent="." instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-792, -378)
|
||||
|
||||
[node name="Ammo2" parent="." instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-808, -378)
|
||||
|
||||
[node name="Ammo3" parent="." instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-808, -400)
|
||||
|
||||
[node name="Ammo4" parent="." instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-791, -401)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue