working on charging system
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using RebootKit.Engine.Simulation;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RebootReality.jelycho.Items {
|
||||
@@ -9,6 +10,13 @@ namespace RebootReality.jelycho.Items {
|
||||
Sword = 2,
|
||||
}
|
||||
|
||||
public interface IItemChargeAction {
|
||||
bool OnChargeStart(Actor user, ItemActor itemActor);
|
||||
void OnChargeUpdate(Actor user, ItemActor itemActor, float chargeProgress);
|
||||
void OnChargeEnd(Actor user, ItemActor itemActor, float chargeProgress);
|
||||
void OnChargeCancel(Actor user, ItemActor itemActor);
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ItemConfig {
|
||||
public ItemType itemType = ItemType.Neutral;
|
||||
@@ -18,7 +26,9 @@ namespace RebootReality.jelycho.Items {
|
||||
|
||||
[Header("Chargeable")]
|
||||
public bool isChargeable = false;
|
||||
public float chargeDuration = 0.5f;
|
||||
public float minChargeDuration = 0.1f;
|
||||
public float maxChargeDuration = 1.0f;
|
||||
public float chargeCooldown = 1.0f;
|
||||
[SerializeReference] public IItemChargeAction chargeAction;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user