using System.Collections.Generic; using System; using Cielonos.MainGame.Inventory; using UnityEngine; namespace Cielonos.MainGame.Characters { [RequireComponent(typeof(Player))] public partial class PlayerOperationSubcontroller : SubcontrollerBase { public Player player => owner; public bool isOverridingMainWeaponPress; public override void Initialize() { base.Initialize(); isOverridingMainWeaponPress = false; } } public partial class PlayerOperationSubcontroller { public event Action OnInteract; public event Action OnNavigateInteractionChoice; public event Action OnDash; public event Action OnDodge; public event Action OnLockonTarget; public event Action OnSelectLockonTarget; public event Action OnWalkPress; public event Action OnWalkRelease; public event Action> OnMainWeaponPrimaryPress; public event Action OnMainWeaponPrimaryRelease; public event Action> OnMainWeaponSecondaryPress; public event Action OnMainWeaponSecondaryRelease; public event Action> OnMainWeaponSpecialAPress; public event Action OnMainWeaponSpecialARelease; public event Action> OnMainWeaponSpecialBPress; public event Action OnMainWeaponSpecialBRelease; public event Action> OnMainWeaponSpecialCPress; public event Action OnMainWeaponSpecialCRelease; public event Action OnSwitchMainWeapon; public event Action OnOpenMainWeaponRoulette; public event Action OnCloseMainWeaponRoulette; public event Action OnFastSwitchMainWeapon; public event Action OnReload; public event Action OnUseConsumableItem; public event Action> OnSupportEquipment0Press; public event Action OnSupportEquipment0Release; public event Action> OnSupportEquipment1Press; public event Action OnSupportEquipment1Release; public event Action> OnSupportEquipment2Press; public event Action OnSupportEquipment2Release; public event Action> OnSupportEquipment3Press; public event Action OnSupportEquipment3Release; } public partial class PlayerOperationSubcontroller { public void Interact() => OnInteract?.Invoke(); public void NavigateInteractionChoice(int delta) => OnNavigateInteractionChoice?.Invoke(delta); public void Dash(Vector3 direction, float length = -1) => OnDash?.Invoke(direction, length); public void Dodge(float length = -1) => OnDodge?.Invoke(length); public void LockonTarget() => OnLockonTarget?.Invoke(); public void SelectLockonTarget(float direction) => OnSelectLockonTarget?.Invoke(direction); public void WalkPress() => OnWalkPress?.Invoke(); public void WalkRelease() => OnWalkRelease?.Invoke(); public void MainWeaponPrimaryPress(List modifiers = default) => OnMainWeaponPrimaryPress?.Invoke(modifiers); public void MainWeaponPrimaryRelease() => OnMainWeaponPrimaryRelease?.Invoke(); public void MainWeaponSecondaryPress(List modifiers = default) => OnMainWeaponSecondaryPress?.Invoke(modifiers); public void MainWeaponSecondaryRelease() => OnMainWeaponSecondaryRelease?.Invoke(); public void MainWeaponSpecialAPress(List modifiers = default) => OnMainWeaponSpecialAPress?.Invoke(modifiers); public void MainWeaponSpecialARelease() => OnMainWeaponSpecialARelease?.Invoke(); public void MainWeaponSpecialBPress(List modifiers = default) => OnMainWeaponSpecialBPress?.Invoke(modifiers); public void MainWeaponSpecialBRelease() => OnMainWeaponSpecialBRelease?.Invoke(); public void MainWeaponSpecialCPress(List modifiers = default) => OnMainWeaponSpecialCPress?.Invoke(modifiers); public void MainWeaponSpecialCRelease() => OnMainWeaponSpecialCRelease?.Invoke(); public void SwitchMainWeapon(int direction) => OnSwitchMainWeapon?.Invoke(direction); public void OpenMainWeaponRoulette() => OnOpenMainWeaponRoulette?.Invoke(); public void CloseMainWeaponRoulette() => OnCloseMainWeaponRoulette?.Invoke(); public void FastSwitchMainWeapon() => OnFastSwitchMainWeapon?.Invoke(); public void SupportEquipment0Press(List modifiers = default) => OnSupportEquipment0Press?.Invoke(modifiers); public void SupportEquipment0Release() => OnSupportEquipment0Release?.Invoke(); public void SupportEquipment1Press(List modifiers = default) => OnSupportEquipment1Press?.Invoke(modifiers); public void SupportEquipment1Release() => OnSupportEquipment1Release?.Invoke(); public void SupportEquipment2Press(List modifiers = default) => OnSupportEquipment2Press?.Invoke(modifiers); public void SupportEquipment2Release() => OnSupportEquipment2Release?.Invoke(); public void SupportEquipment3Press(List modifiers = default) => OnSupportEquipment3Press?.Invoke(modifiers); public void SupportEquipment3Release() => OnSupportEquipment3Release?.Invoke(); } }