public bool Run(InstantlyRunnable instantlyRunnable, TBAPlayer tbaPlayer, bool local = true) { if (instantlyRunnable == null) { return(false); } LastRan = instantlyRunnable; try { if (!LastRan.Run(tbaPlayer)) { return(false); } } catch { return(false); } if (local && Main.netMode == NetmodeID.MultiplayerClient) { new InstantlyRunnableRanPacket { StringifiedClass = instantlyRunnable.GetType().ToString() }.Send(); } return(true); }
public void Select(InstantlyRunnable instantlyRunnable) => Selected = instantlyRunnable;