2023-01-04 18:27:46 +02:00
|
|
|
using System;
|
2023-01-04 17:56:46 +02:00
|
|
|
using System.IO;
|
2021-08-23 00:37:37 +02:00
|
|
|
using UnityEngine;
|
2022-09-25 16:08:45 +03:00
|
|
|
using UnityEngine.Video;
|
2021-08-23 00:37:37 +02:00
|
|
|
[CreateAssetMenu(fileName = "Attack", menuName = "Scriptable Objects/Attack", order = 2)]
|
|
|
|
|
public class AttackSO : ScriptableObject
|
|
|
|
|
{
|
2022-09-14 23:06:52 +03:00
|
|
|
[Header("Main")]
|
|
|
|
|
public int damage;
|
|
|
|
|
public AttackTypeEnum attackTypeEnum;
|
|
|
|
|
public int hitStun;
|
2022-09-24 20:09:30 +03:00
|
|
|
public int blockStun;
|
2022-11-05 16:08:03 +02:00
|
|
|
public Vector2 travelDistance;
|
2022-09-20 00:57:52 +03:00
|
|
|
public Vector2 knockbackForce;
|
2022-11-03 13:09:06 +02:00
|
|
|
public int knockbackDuration;
|
2022-11-12 16:14:22 +02:00
|
|
|
public int knockbackArc;
|
2022-09-14 23:06:52 +03:00
|
|
|
|
|
|
|
|
[Header("Properties")]
|
2023-06-10 01:06:31 +03:00
|
|
|
public int superArmor;
|
2022-09-14 23:06:52 +03:00
|
|
|
public bool isAirAttack;
|
|
|
|
|
public bool isProjectile;
|
|
|
|
|
public bool isArcana;
|
2022-09-21 23:06:26 +03:00
|
|
|
public bool jumpCancelable;
|
2022-09-14 23:06:52 +03:00
|
|
|
public bool causesKnockdown;
|
2022-11-28 02:57:32 +02:00
|
|
|
public bool causesSoftKnockdown;
|
2022-09-14 23:06:52 +03:00
|
|
|
[Header("Sounds")]
|
|
|
|
|
public string attackSound;
|
|
|
|
|
public string impactSound;
|
|
|
|
|
[Header("Visuals")]
|
|
|
|
|
[Range(0, 150)]
|
|
|
|
|
public int hitstop;
|
|
|
|
|
public GameObject hitEffect;
|
|
|
|
|
public Vector2 hitEffectPosition;
|
|
|
|
|
public float hitEffectRotation;
|
2022-12-23 03:17:40 +02:00
|
|
|
public string hurtEffect;
|
2024-01-30 20:38:57 +02:00
|
|
|
public string moveMaterial;
|
|
|
|
|
|
2022-09-14 23:06:52 +03:00
|
|
|
[HideInInspector] public Vector2 hurtEffectPosition;
|
|
|
|
|
public float hurtEffectRotation;
|
|
|
|
|
public CameraShakerSO cameraShaker;
|
2022-09-25 16:08:45 +03:00
|
|
|
[Header("Information")]
|
|
|
|
|
public string moveName;
|
|
|
|
|
[TextArea(5, 7)]
|
|
|
|
|
public string moveDescription;
|
|
|
|
|
public VideoClip moveVideo;
|
2023-01-04 17:56:46 +02:00
|
|
|
|
|
|
|
|
public void Serialize(BinaryWriter bw)
|
|
|
|
|
{
|
|
|
|
|
bw.Write(travelDistance.x);
|
|
|
|
|
bw.Write(travelDistance.y);
|
|
|
|
|
bw.Write(damage);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Deserialize(BinaryReader br)
|
|
|
|
|
{
|
|
|
|
|
travelDistance.x = br.ReadSingle();
|
|
|
|
|
travelDistance.y = br.ReadSingle();
|
|
|
|
|
damage = br.ReadInt32();
|
|
|
|
|
}
|
2022-10-16 11:57:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ResultAttack
|
|
|
|
|
{
|
|
|
|
|
public int startUpFrames;
|
|
|
|
|
public int activeFrames;
|
|
|
|
|
public int recoveryFrames;
|
|
|
|
|
public AttackTypeEnum attackTypeEnum;
|
|
|
|
|
public int damage;
|
|
|
|
|
public int comboDamage;
|
2021-08-23 00:37:37 +02:00
|
|
|
}
|