예제 #1
0
        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);
        }
예제 #2
0
 public void Select(InstantlyRunnable instantlyRunnable) => Selected = instantlyRunnable;