mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 01:35:54 +00:00
Made crosshair into a module
This commit is contained in:
parent
625466d2d7
commit
ddadb9bd04
10 changed files with 93 additions and 36 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Cirno.Scripts.Components.FSM.Player;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Cirno.Scripts.Utils;
|
||||
using Godot;
|
||||
|
|
@ -9,6 +10,7 @@ namespace Cirno.Scripts.Components.Actors;
|
|||
|
||||
public partial class PlayerWeaponProvider : Node2D
|
||||
{
|
||||
[Export] public PlayerStorageModule StorageModule { get; set; }
|
||||
[Export] public PackedScene WeaponTemplate { get; private set; }
|
||||
public Array<Weapon> EquippedWeapons { get; set; } = [];
|
||||
|
||||
|
|
@ -157,6 +159,8 @@ public partial class PlayerWeaponProvider : Node2D
|
|||
|
||||
var weapon = this.CreateSibling<Weapon>(WeaponTemplate);
|
||||
weapon.WeaponData = startingItem.WeaponData;
|
||||
|
||||
weapon.Texture = startingItem.InventorySprite;
|
||||
|
||||
this.AddWeapon(weapon);
|
||||
return weapon;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue