129 lines
5.9 KiB
C#
129 lines
5.9 KiB
C#
using System.Collections.Generic;
|
|
using System;
|
|
using Cielonos.MainGame.Inventory;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Characters
|
|
{
|
|
[RequireComponent(typeof(Player))]
|
|
public partial class PlayerOperationSubcontroller : SubcontrollerBase<Player>
|
|
{
|
|
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<int> OnNavigateInteractionChoice;
|
|
|
|
public event Action<Vector3, float> OnDash;
|
|
public event Action<float> OnDodge;
|
|
|
|
public event Action OnLockonTarget;
|
|
public event Action<float> OnSelectLockonTarget;
|
|
|
|
public event Action OnWalkPress;
|
|
public event Action OnWalkRelease;
|
|
|
|
public event Action<List<PlayerInputModifierType>> OnMainWeaponPrimaryPress;
|
|
public event Action OnMainWeaponPrimaryRelease;
|
|
|
|
public event Action<List<PlayerInputModifierType>> OnMainWeaponSecondaryPress;
|
|
public event Action OnMainWeaponSecondaryRelease;
|
|
|
|
public event Action<List<PlayerInputModifierType>> OnMainWeaponSpecialAPress;
|
|
public event Action OnMainWeaponSpecialARelease;
|
|
|
|
public event Action<List<PlayerInputModifierType>> OnMainWeaponSpecialBPress;
|
|
public event Action OnMainWeaponSpecialBRelease;
|
|
|
|
public event Action<List<PlayerInputModifierType>> OnMainWeaponSpecialCPress;
|
|
public event Action OnMainWeaponSpecialCRelease;
|
|
|
|
public event Action<int> OnSwitchMainWeapon;
|
|
public event Action OnOpenMainWeaponRoulette;
|
|
public event Action OnCloseMainWeaponRoulette;
|
|
public event Action OnFastSwitchMainWeapon;
|
|
|
|
public event Action OnReload;
|
|
|
|
public event Action OnUseConsumableItem;
|
|
|
|
public event Action<List<PlayerInputModifierType>> OnSupportEquipment0Press;
|
|
public event Action OnSupportEquipment0Release;
|
|
public event Action<List<PlayerInputModifierType>> OnSupportEquipment1Press;
|
|
public event Action OnSupportEquipment1Release;
|
|
public event Action<List<PlayerInputModifierType>> OnSupportEquipment2Press;
|
|
public event Action OnSupportEquipment2Release;
|
|
public event Action<List<PlayerInputModifierType>> 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<PlayerInputModifierType> modifiers = default) => OnMainWeaponPrimaryPress?.Invoke(modifiers);
|
|
|
|
public void MainWeaponPrimaryRelease() => OnMainWeaponPrimaryRelease?.Invoke();
|
|
|
|
public void MainWeaponSecondaryPress(List<PlayerInputModifierType> modifiers = default) => OnMainWeaponSecondaryPress?.Invoke(modifiers);
|
|
|
|
public void MainWeaponSecondaryRelease() => OnMainWeaponSecondaryRelease?.Invoke();
|
|
|
|
public void MainWeaponSpecialAPress(List<PlayerInputModifierType> modifiers = default) => OnMainWeaponSpecialAPress?.Invoke(modifiers);
|
|
|
|
public void MainWeaponSpecialARelease() => OnMainWeaponSpecialARelease?.Invoke();
|
|
|
|
public void MainWeaponSpecialBPress(List<PlayerInputModifierType> modifiers = default) => OnMainWeaponSpecialBPress?.Invoke(modifiers);
|
|
|
|
public void MainWeaponSpecialBRelease() => OnMainWeaponSpecialBRelease?.Invoke();
|
|
|
|
public void MainWeaponSpecialCPress(List<PlayerInputModifierType> 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<PlayerInputModifierType> modifiers = default) => OnSupportEquipment0Press?.Invoke(modifiers);
|
|
public void SupportEquipment0Release() => OnSupportEquipment0Release?.Invoke();
|
|
|
|
public void SupportEquipment1Press(List<PlayerInputModifierType> modifiers = default) => OnSupportEquipment1Press?.Invoke(modifiers);
|
|
public void SupportEquipment1Release() => OnSupportEquipment1Release?.Invoke();
|
|
|
|
public void SupportEquipment2Press(List<PlayerInputModifierType> modifiers = default) => OnSupportEquipment2Press?.Invoke(modifiers);
|
|
public void SupportEquipment2Release() => OnSupportEquipment2Release?.Invoke();
|
|
|
|
public void SupportEquipment3Press(List<PlayerInputModifierType> modifiers = default) => OnSupportEquipment3Press?.Invoke(modifiers);
|
|
public void SupportEquipment3Release() => OnSupportEquipment3Release?.Invoke();
|
|
}
|
|
}
|