Files
FueraDeEscala/Assets/Game Kit Controller/Scripts/Powers/powersAndAbilitiesSystem.cs
Robii Aragon fd87a6ffd5 add ckg
plantilla base para movimiento básico
2026-02-05 05:07:55 -08:00

45 lines
913 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class powersAndAbilitiesSystem : MonoBehaviour
{
public List<powerInfo> powerInfoList = new List<powerInfo> ();
public void disableGeneralPower (string powerName)
{
for (int i = 0; i < powerInfoList.Count; i++) {
if (powerInfoList [i].Name.Equals (powerName)) {
powerInfoList [i].eventToDisable.Invoke ();
return;
}
}
}
public void enableGeneralPower (string powerName)
{
for (int i = 0; i < powerInfoList.Count; i++) {
if (powerInfoList [i].Name.Equals (powerName)) {
powerInfoList [i].eventToEnable.Invoke ();
return;
}
}
}
public void updateComponent ()
{
GKC_Utils.updateComponent (this);
}
[System.Serializable]
public class powerInfo
{
public string Name;
public UnityEvent eventToEnable;
public UnityEvent eventToDisable;
}
}