public static void LateUpdate() { if (stack.Count < 1) { return; } if (Input.GetKeyUp("escape")) { function f = stack.Pop(); if (f == null) { return; } f(); } }
public static void Add(function function) { stack.Push(function); }