62 lines
1.9 KiB
C#
62 lines
1.9 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using RebootKit.Engine.Simulation;
|
|
using UnityEngine;
|
|
using UnityEngine.AddressableAssets;
|
|
|
|
namespace RebootReality.jelycho.Items {
|
|
public interface IItemChargeAction {
|
|
bool OnChargeStart(Actor user, ItemActor itemActor);
|
|
bool OnChargeUpdate(Actor user, ItemActor itemActor, float chargeProgress);
|
|
bool OnChargeEnd(Actor user, ItemActor itemActor, float chargeProgress);
|
|
void OnChargeCancel(Actor user, ItemActor itemActor);
|
|
}
|
|
|
|
public interface IItemQuickAttackAction {
|
|
void Attack(Actor attacker, ItemActor itemActor);
|
|
}
|
|
|
|
[Serializable]
|
|
public class ItemHandsAnimationClipsSet {
|
|
public AnimationClip idle;
|
|
public AnimationClip charging;
|
|
public AnimationClip chargedIdle;
|
|
public AnimationClip chargedUse;
|
|
|
|
public AnimationClip[] quickAttacks;
|
|
public AnimationClip block;
|
|
}
|
|
|
|
[Serializable]
|
|
public struct ItemActorMountingConfig {
|
|
public AssetReferenceGameObject actor;
|
|
[MaxLength(32)] public string slotName;
|
|
}
|
|
|
|
[Serializable]
|
|
public class ItemConfig {
|
|
public Sprite icon;
|
|
|
|
[Header("Mounting")]
|
|
[MaxLength(32)] public string characterEquippedMountSlotName = "hand_right";
|
|
|
|
public ItemActorMountingConfig[] additionalActorsToMount;
|
|
|
|
[Header("Character Animations")]
|
|
public ItemHandsAnimationClipsSet handsAnimationClipsSets;
|
|
|
|
[Header("Quick Attack")]
|
|
public bool canQuickAttack = false;
|
|
[SerializeReference] public IItemQuickAttackAction quickAttackAction;
|
|
|
|
[Header("Block")]
|
|
public bool canBlock = false;
|
|
|
|
[Header("Chargeable")]
|
|
public bool isChargeable = false;
|
|
public float minChargeDuration = 0.5f;
|
|
public float maxChargeDuration = 1.0f;
|
|
public float chargeCooldown = 1.0f;
|
|
[SerializeReference] public IItemChargeAction chargeAction;
|
|
}
|
|
} |