Files
Robii Aragon fd87a6ffd5 add ckg
plantilla base para movimiento básico
2026-02-05 05:07:55 -08:00

57 lines
1.4 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static sharedActionSystem;
public class sharedActionZoneManager : MonoBehaviour
{
[Header ("Main Settings")]
[Space]
public bool sharedActionZonesEnabled = true;
[Space]
[Header ("Shared Action Zone Settings")]
[Space]
public List<sharedActionZone> sharedActionZoneList = new List<sharedActionZone> ();
public bool isSharedActionZonesEnabled ()
{
return sharedActionZonesEnabled;
}
public List<sharedActionZone> getSharedActionZoneList ()
{
return sharedActionZoneList;
}
public void setSharedActionZonesEnabledState (bool state)
{
sharedActionZonesEnabled = state;
}
public void getAllSharedActionZonesOnScene ()
{
sharedActionZoneList.Clear ();
sharedActionZone [] newSharedActionZoneList = FindObjectsOfType<sharedActionZone> ();
foreach (sharedActionZone currentSharedActionZone in newSharedActionZoneList) {
if (!sharedActionZoneList.Contains (currentSharedActionZone)) {
sharedActionZoneList.Add (currentSharedActionZone);
}
}
updateComponent ();
}
void updateComponent ()
{
GKC_Utils.updateComponent (this);
GKC_Utils.updateDirtyScene ("Update Shared Action Manager", gameObject);
}
}