コード例 #1
0
 public void Unload()
 {
     foreach (PointBlankCommand command in PointBlankCommandManager.Commands)
     {
         if (typeof(FireworksCommand).IsAssignableFrom(command.GetType()))
         {
             PointBlankCommandManager.UnloadCommand(command);
         }
     }
 }
コード例 #2
0
        public static void UnregisterCommand(IRocketCommand command)
        {
            try
            {
                PointBlankCommand cmd = PointBlankCommandManager.Commands.FirstOrDefault(a => typeof(FireworksCommand).IsAssignableFrom(a.GetType()) && ((FireworksCommand)a)._RocketCommand == command);

                if (cmd == null)
                {
                    return;
                }
                PointBlankCommandManager.UnloadCommand(cmd);
            }
            catch (Exception ex)
            {
                return;
            }
        }