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

113 lines
2.9 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;
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;
public float arcanaRecharge = 1;
[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;
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
2022-10-07 14:54:38 +03:00
public int Arcana { get { return arcanaLevel; } set { } }
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-11-07 13:09:55 +02:00
return (DemonicsFloat)0.03;
2022-11-03 21:06:48 +02:00
case 2:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0.05;
2022-11-03 21:06:48 +02:00
case 3:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0.07;
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-11-07 13:09:55 +02:00
return (DemonicsFloat)0.15;
2022-11-03 21:06:48 +02:00
case 2:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0.18;
2022-11-03 21:06:48 +02:00
case 3:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0.21;
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-11-10 11:13:28 +02:00
return (DemonicsFloat)0.34;
2022-11-03 21:06:48 +02:00
case 2:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0.35;
2022-11-10 11:13:28 +02:00
case 3:
return (DemonicsFloat)0.37;
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-11-07 13:09:55 +02:00
return (DemonicsFloat)0.22;
2022-11-03 21:06:48 +02:00
case 2:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0.25;
2022-11-03 21:06:48 +02:00
case 3:
2022-11-07 13:09:55 +02:00
return (DemonicsFloat)0.28;
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 { }
}
2021-08-20 11:16:49 +02:00
}