Files
Darklings-FightingGame/Assets/_Project/Scripts/ScriptableObjectScripts/PlayerStatsSO.cs

117 lines
3.0 KiB
C#
Raw Normal View History

2021-08-20 11:16:49 +02:00
using UnityEngine;
using UnityEngine.U2D.Animation;
2021-08-20 11:16:49 +02:00
[CreateAssetMenu(fileName = "Player Stats", menuName = "Scriptable Objects/Player Stat", order = 1)]
public class PlayerStatsSO : ScriptableObject
{
2022-10-07 14:54:38 +03:00
[Header("Main")]
public int characterIndex;
public Sprite[] portraits;
public AnimationSO _animation;
public DialogueSO _dialogue;
2022-12-15 21:13:43 +02:00
public EffectsLibrarySO _effectsLibrary;
2022-10-07 14:54:38 +03:00
public CharacterTypeEnum characterName;
[Header("Stats")]
public int defenseLevel;
public int arcanaLevel;
public int speedLevel;
2022-11-03 21:06:48 +02:00
public int jumpLevel;
public int dashLevel;
2022-10-07 14:54:38 +03:00
public bool canDoubleJump = true;
2023-01-03 22:34:07 +02:00
public int arcanaRecharge = 1;
2022-10-07 14:54:38 +03:00
[Header("Moves")]
public AttackSO m2L;
public AttackSO m5L;
public AttackSO m2M;
public AttackSO m5M;
public AttackSO m2H;
public AttackSO m5H;
public AttackSO jL;
public AttackSO jM;
2022-11-28 02:57:32 +02:00
public AttackSO jH;
2022-10-07 14:54:38 +03:00
public AttackSO mThrow;
public AttackSO mParry;
2022-10-21 21:20:37 +03:00
public AttackSO mRedFrenzy;
2022-10-07 14:54:38 +03:00
public ArcanaSO m5Arcana;
public ArcanaSO m2Arcana;
public ArcanaSO jArcana;
[HideInInspector] public int maxHealth = 10000;
2022-09-05 22:07:12 +03:00
2023-01-03 22:34:07 +02:00
public int Arcana { get { return arcanaLevel * ARCANA_MULTIPLIER; } set { } }
2022-10-07 14:54:38 +03:00
public float Defense { get { return (defenseLevel - 1) * 0.05f + 0.95f; } set { } }
2022-11-07 13:09:55 +02:00
public DemonicsFloat SpeedWalk
2022-11-03 21:06:48 +02:00
{
get
{
switch (speedLevel)
{
case 1:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)0.48;
2022-11-03 21:06:48 +02:00
case 2:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)0.8;
2022-11-03 21:06:48 +02:00
case 3:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)1.12;
2022-11-03 21:06:48 +02:00
default:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0;
2022-11-03 21:06:48 +02:00
}
}
set { }
}
2022-11-07 13:09:55 +02:00
public DemonicsFloat SpeedRun
2022-11-03 21:06:48 +02:00
{
get
{
switch (speedLevel)
{
case 1:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)2.4;
2022-11-03 21:06:48 +02:00
case 2:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)2.88;
2022-11-03 21:06:48 +02:00
case 3:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)3.36;
2022-11-03 21:06:48 +02:00
default:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0;
2022-11-03 21:06:48 +02:00
}
}
set { }
}
2022-11-07 13:09:55 +02:00
public DemonicsFloat JumpForce
2022-11-03 21:06:48 +02:00
{
get
{
switch (jumpLevel)
{
case 1:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)5.44;
2022-11-03 21:06:48 +02:00
case 2:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)5.6;
2022-11-10 11:13:28 +02:00
case 3:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)5.92;
2022-11-03 21:06:48 +02:00
default:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0;
2022-11-03 21:06:48 +02:00
}
}
set { }
}
2022-11-07 13:09:55 +02:00
public DemonicsFloat DashForce
2022-11-03 21:06:48 +02:00
{
get
{
switch (dashLevel)
{
case 1:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)3.52;
2022-11-03 21:06:48 +02:00
case 2:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)4;
2022-11-03 21:06:48 +02:00
case 3:
2022-12-29 14:40:06 +02:00
return (DemonicsFloat)4.48;
2022-11-03 21:06:48 +02:00
default:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0;
2022-11-03 21:06:48 +02:00
}
}
set { }
}
2023-01-03 22:34:07 +02:00
public const int ARCANA_MULTIPLIER = 1000;
2021-08-20 11:16:49 +02:00
}