2025-11-25 08:19:33 -05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Cielonos.MainGame.Inventory;
|
2025-12-08 05:27:53 -05:00
|
|
|
using Cielonos.UI;
|
2025-11-25 08:19:33 -05:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Cielonos.MainGame.Characters
|
|
|
|
|
{
|
|
|
|
|
public class PlayerEquipmentSubmodule : SubmoduleBase<PlayerInventorySubcontroller>
|
|
|
|
|
{
|
|
|
|
|
public List<MainWeaponBase> preparedMainWeapons;
|
|
|
|
|
public MainWeaponBase currentMainWeapon;
|
|
|
|
|
|
|
|
|
|
public PlayerEquipmentSubmodule(PlayerInventorySubcontroller owner) : base(owner)
|
|
|
|
|
{
|
|
|
|
|
preparedMainWeapons = new List<MainWeaponBase>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void EquipMainWeapon(MainWeaponBase newWeapon)
|
|
|
|
|
{
|
2025-12-08 05:27:53 -05:00
|
|
|
newWeapon.Initialize();
|
2025-11-25 08:19:33 -05:00
|
|
|
currentMainWeapon = newWeapon;
|
|
|
|
|
currentMainWeapon.OnEquipped();
|
|
|
|
|
currentMainWeapon.RegisterFullBodyFuncAnims();
|
2025-12-08 05:27:53 -05:00
|
|
|
|
|
|
|
|
PlayerCanvas.Instance.mainWeaponUIArea.Initialize(currentMainWeapon);
|
2025-11-25 08:19:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void RemoveMainWeapon()
|
|
|
|
|
{
|
|
|
|
|
currentMainWeapon.OnUnequipped();
|
|
|
|
|
currentMainWeapon = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|