2026-04-10 퀵슬롯진행중
This commit is contained in:
@@ -14,7 +14,7 @@ public enum ItemEffectType
|
||||
}
|
||||
|
||||
[CreateAssetMenu(fileName = "New Item", menuName = "Item")]
|
||||
public class Item : ScriptableObject
|
||||
public class Item : UseableEntry
|
||||
{
|
||||
public string ItemId;
|
||||
public ItemType ItemType;
|
||||
|
||||
@@ -26,6 +26,12 @@ public class InputManager : MonoBehaviour
|
||||
public event Action OnNormalAttackEvent;
|
||||
public event Action OnHeavyAttackEvent;
|
||||
public event Action OnInteractionEvent;
|
||||
public event Action OnKeyDown_SlotQEvent;
|
||||
public event Action OnKeyDown_SlotEEvent;
|
||||
public event Action OnKeyDown_SlotREvent;
|
||||
public event Action OnKeyDown_SlotTEvent;
|
||||
public event Action OnKeyDown_SlotFEvent;
|
||||
public event Action OnKeyDown_SlotGEvent;
|
||||
|
||||
|
||||
//키조작
|
||||
@@ -105,6 +111,14 @@ public void SetCharacterInputMap(string mapName)
|
||||
BindActionCharacter("NormalAttack", OnNormalAttack);
|
||||
BindActionCharacter("HeavyAttack", OnHeavyAttack);
|
||||
|
||||
//퀵슬롯은 하나의 메서드로 관리
|
||||
BindActionCharacter("UseSlot_Q",OnKeyDown_Slot);
|
||||
BindActionCharacter("UseSlot_E",OnKeyDown_Slot);
|
||||
BindActionCharacter("UseSlot_R",OnKeyDown_Slot);
|
||||
BindActionCharacter("UseSlot_T",OnKeyDown_Slot);
|
||||
BindActionCharacter("UseSlot_F",OnKeyDown_Slot);
|
||||
BindActionCharacter("UseSlot_G",OnKeyDown_Slot);
|
||||
|
||||
BindActionCharacter("Interaction", OnInteraction);
|
||||
|
||||
BindActionCharacter("OnkeyDown_IKey", OnKeyDown_IKey);
|
||||
@@ -223,6 +237,14 @@ private void OnInteraction(InputAction.CallbackContext ctx)
|
||||
if (ctx.started)
|
||||
OnInteractionEvent?.Invoke();
|
||||
}
|
||||
|
||||
private void OnKeyDown_Slot(InputAction.CallbackContext ctx)
|
||||
{
|
||||
if(ctx.started)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 키별 조작
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
using UnityEngine;
|
||||
|
||||
public enum WeaponType { Sword, Bow}
|
||||
public enum WeaponType { Sword, Bow, MagicBook}
|
||||
@@ -414,7 +414,7 @@ private void StartAreaSelect(int slotIndex)
|
||||
{
|
||||
_areaIndicator = Instantiate(skill.Data.AreaIndicatorPrefab);
|
||||
float range = skill.CurrentLevelData.Range;
|
||||
_areaIndicator.transform.localScale = new Vector3(range * 2f, 1f, range * 2f);
|
||||
_areaIndicator.transform.localScale = new Vector3(range * 2f, range * 2f, range * 2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
10
Assets/02_Scripts/_Shared/UseableEntry.cs
Normal file
10
Assets/02_Scripts/_Shared/UseableEntry.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using UnityEngine;
|
||||
|
||||
public abstract class UseableEntry : ScriptableObject
|
||||
{
|
||||
public string EntryName;
|
||||
public string EntryDesc;
|
||||
public Sprite icon;
|
||||
|
||||
public abstract void Use();
|
||||
}
|
||||
2
Assets/02_Scripts/_Shared/UseableEntry.cs.meta
Normal file
2
Assets/02_Scripts/_Shared/UseableEntry.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 945424eeadf0fc140bf5f9d4372350f7
|
||||
Reference in New Issue
Block a user