//Function to add Actions to Array public void AddEvent(actions action) { checkpoint = AtomicTags.FindByTag(checkpointTag.Value).GetComponent <SavePoint>(); if (myActions == null) { myActions = new actions[checkpoint.hasBeenActivated.Length + 1]; } /*for (int i=checkpoint.numActive+1;i<checkpoint.hasBeenActivated.Length;i++) * { * if (!checkpoint.hasBeenActivated[i]) * { * events[i] -= action; * events[i] += action; * Debug.Log("Added " + action.GetMethodInfo() +" to checksave " +i); * } * }*/ if (checkpoint.numActive >= myActions.Length) { Debug.Log("returning empty"); return; } Debug.Log(action.GetMethodInfo()); myActions[checkpoint.numActive + 1] -= action; myActions[checkpoint.numActive + 1] += action; }
public void InvokeDestructables() { Debug.Log("invoking"); eventActivateDestructables?.Invoke(); Debug.Log(eventActivateDestructables?.GetMethodInfo()); }