mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:05:34 +00:00
Ammo UI system
This commit is contained in:
parent
70c514f1a9
commit
5eb7b578bc
22 changed files with 238 additions and 87 deletions
|
|
@ -1,7 +1,10 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Cirno.Scripts;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot.Collections;
|
||||
|
||||
public partial class PlayerMovement : CharacterBody2D, IDestructible
|
||||
{
|
||||
|
|
@ -41,13 +44,15 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
|
||||
[Export] public float MaxHealth = 32f;
|
||||
|
||||
[Export] public Weapon EquippedWeapon;
|
||||
public Weapon EquippedWeapon { get; set; }
|
||||
|
||||
private float _currentHealth = 0f;
|
||||
|
||||
private bool _isDestroyed = false;
|
||||
|
||||
private GameManager _gameManager;
|
||||
|
||||
private InventoryManager _inventoryManager;
|
||||
|
||||
[Export] public Sprite2D HitboxSprite { get; set; }
|
||||
|
||||
|
|
@ -94,6 +99,8 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
|
||||
_gameManager = this.GetGameManager(); //GetNode<GameManager>("/root/GameScene");
|
||||
|
||||
_inventoryManager = this.GetInventoryManager();
|
||||
|
||||
_gameManager.GameStateChange += GameManagerOnGameStateChange;
|
||||
|
||||
if (SelectorScene != null)
|
||||
|
|
@ -102,7 +109,7 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
_selector.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void GameManagerOnGameStateChange(GameState state)
|
||||
{
|
||||
switch (state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue