2021-08-23 00:37:37 +02:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class PlayerComboSystem : MonoBehaviour
|
|
|
|
|
{
|
2022-11-28 02:57:32 +02:00
|
|
|
private Player _player;
|
2021-08-23 00:37:37 +02:00
|
|
|
|
2022-11-28 02:57:32 +02:00
|
|
|
void Awake()
|
|
|
|
|
{
|
|
|
|
|
_player = GetComponent<Player>();
|
|
|
|
|
}
|
2021-08-23 00:37:37 +02:00
|
|
|
|
2022-11-28 02:57:32 +02:00
|
|
|
public AttackSO GetComboAttack(InputEnum inputEnum, bool isCrouching, bool isAir)
|
|
|
|
|
{
|
|
|
|
|
if (inputEnum == InputEnum.Throw)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.mThrow;
|
|
|
|
|
}
|
|
|
|
|
if (isCrouching)
|
|
|
|
|
{
|
|
|
|
|
return GetCrouchingAttackType(inputEnum);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (isAir)
|
|
|
|
|
{
|
|
|
|
|
return GetJumpAttackType(inputEnum);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return GetStandingAttackType(inputEnum);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-09-28 17:04:18 +02:00
|
|
|
|
2022-11-28 02:57:32 +02:00
|
|
|
private AttackSO GetJumpAttackType(InputEnum inputEnum)
|
|
|
|
|
{
|
|
|
|
|
if (inputEnum == InputEnum.Light)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.jL;
|
|
|
|
|
}
|
|
|
|
|
else if (inputEnum == InputEnum.Medium)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.jM;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.jH;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-07-24 01:25:32 +03:00
|
|
|
|
2022-11-28 02:57:32 +02:00
|
|
|
private AttackSO GetCrouchingAttackType(InputEnum inputEnum)
|
|
|
|
|
{
|
|
|
|
|
if (inputEnum == InputEnum.Light)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.m2L;
|
|
|
|
|
}
|
|
|
|
|
else if (inputEnum == InputEnum.Medium)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.m2M;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.m2H;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-02-23 00:25:32 +01:00
|
|
|
|
2022-11-28 02:57:32 +02:00
|
|
|
private AttackSO GetStandingAttackType(InputEnum inputEnum)
|
|
|
|
|
{
|
|
|
|
|
if (inputEnum == InputEnum.Light)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.m5L;
|
|
|
|
|
}
|
|
|
|
|
else if (inputEnum == InputEnum.Medium)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.m5M;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.m5H;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-02-23 00:25:32 +01:00
|
|
|
|
2022-11-28 02:57:32 +02:00
|
|
|
public AttackSO GetThrow()
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.mThrow;
|
|
|
|
|
}
|
2022-04-21 23:58:15 +02:00
|
|
|
|
2022-11-28 02:57:32 +02:00
|
|
|
public ArcanaSO GetArcana(bool isCrouching = false, bool isAir = false)
|
|
|
|
|
{
|
|
|
|
|
if (isAir)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.jArcana;
|
|
|
|
|
}
|
|
|
|
|
if (isCrouching)
|
|
|
|
|
{
|
|
|
|
|
return _player.playerStats.m2Arcana;
|
|
|
|
|
}
|
|
|
|
|
return _player.playerStats.m5Arcana;
|
|
|
|
|
}
|
2021-08-23 00:37:37 +02:00
|
|
|
}
|