Simple interactable rework

This commit is contained in:
Michal Pikulski
2025-10-31 13:50:08 +01:00
parent 095f21908b
commit 917230e10a
15 changed files with 1897 additions and 103 deletions

View File

@@ -1,9 +1,9 @@
using UnityEngine;
using UnityEngine;
using UnityEditor;
namespace Interactions
{
[CustomEditor(typeof(Interactable))]
[CustomEditor(typeof(InteractableBase), true)]
public class InteractableEditor : UnityEditor.Editor
{
SerializedProperty isOneTimeProp;
@@ -56,7 +56,7 @@ namespace Interactions
}
// Display character target counts
Interactable interactable = (Interactable)target;
InteractableBase interactable = (InteractableBase)target;
CharacterMoveToTarget[] moveTargets = interactable.GetComponentsInChildren<CharacterMoveToTarget>();
int trafalgarTargets = 0;
int pulverTargets = 0;
@@ -92,7 +92,7 @@ namespace Interactions
private void CreateMoveTarget(CharacterToInteract characterType)
{
Interactable interactable = (Interactable)target;
InteractableBase interactable = (InteractableBase)target;
// Create a new GameObject
GameObject targetObj = new GameObject($"{characterType}MoveTarget");