當前位置: 首頁>>代碼示例>>C#>>正文


C# Terraria.Main類代碼示例

本文整理匯總了C#中Terraria.Main的典型用法代碼示例。如果您正苦於以下問題:C# Main類的具體用法?C# Main怎麽用?C# Main使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Main類屬於Terraria命名空間,在下文中一共展示了Main類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: MB

        public MB(Main game)
            : base(game)
        {
            Order = 1;

            config = new MBConfig();
        }
開發者ID:Tygra,項目名稱:MultiBuff,代碼行數:7,代碼來源:MB.cs

示例2: AFK

 public AFK(Main game)
     : base(game)
 {
     Order = 50;
     AFKConfig = new AFKConfigFile();
     Players = new Player[256];
 }
開發者ID:CrazyLegsSteph,項目名稱:AFK,代碼行數:7,代碼來源:AFK.cs

示例3: AddMenuButtons

		//add to Terraria.Main.DrawMenu in Main.menuMode == 0 after achievements
		//Interface.AddMenuButtons(this, this.selectedMenu, array9, array7, ref num, ref num3, ref num10, ref num5);
		internal static void AddMenuButtons(Main main, int selectedMenu, string[] buttonNames, float[] buttonScales, ref int offY, ref int spacing, ref int buttonIndex, ref int numButtons)
		{
			buttonNames[buttonIndex] = "Mods";
			if (selectedMenu == buttonIndex)
			{
				Main.PlaySound(10, -1, -1, 1);
				Main.menuMode = modsMenuID;
			}
			buttonIndex++;
			numButtons++;
			buttonNames[buttonIndex] = "Mod Sources";
			if (selectedMenu == buttonIndex)
			{
				Main.PlaySound(10, -1, -1, 1);
				Main.menuMode = modSourcesID;
			}
			buttonIndex++;
			numButtons++;
			buttonNames[buttonIndex] = "Mod Browser (Beta)";
			if (selectedMenu == buttonIndex)
			{
				Main.PlaySound(10, -1, -1, 1);
				Main.menuMode = modBrowserID;
			}
			buttonIndex++;
			numButtons++;
			offY = 220;
			for (int k = 0; k < numButtons; k++)
			{
				buttonScales[k] = 0.82f;
			}
			spacing = 45;
		}
開發者ID:JavidPack,項目名稱:TerraCustom,代碼行數:35,代碼來源:Interface.cs

示例4: TChatChannels

 public TChatChannels(Main game)
     : base(game)
 {
     AutoJoin = true;
     PlugInHandler.AddPlugIn(this);
     Manager = new ChannelManager();
 }
開發者ID:jordsti,項目名稱:TPulse,代碼行數:7,代碼來源:TChatChannels.cs

示例5: TradeRequest

        public TradeRequest(Main game) : base(game)
        {
            Order = 4;

            for (int i = 0; i < Main.maxPlayers; i++)
                TradeActive[i] = new TradePlayer();
        }
開發者ID:Marcus101RR,項目名稱:TradeRequest,代碼行數:7,代碼來源:TradeRequest.cs

示例6: LaunchGame

		public static void LaunchGame(string[] args)
		{
			Program.LaunchParameters = Utils.ParseArguements(args);
            ThreadPool.SetMinThreads(8, 8);
            using (Main main = new Main())
			{
				try
                {
                    SocialAPI.Initialize(null);
                    LaunchInitializer.LoadParameters(main);
                    Main.OnEngineLoad += delegate
					{
						Program.ForceLoadAssembly(Assembly.GetExecutingAssembly(), true);
					};
#if CLIENT
                    main.Run();
#else
                    main.DedServ();
#endif
                }
                catch (Exception e)
				{
					Program.DisplayException(e);
				}
			}
		}
開發者ID:thegamingboffin,項目名稱:Ulterraria_Reborn_GitHub,代碼行數:26,代碼來源:Program.cs

示例7: Cauldron

 public Cauldron(Main game)
     : base(game)
 {
     Order = 4;
     String savepath = Path.Combine(TShock.SavePath, "potions.cfg");
     CauldronReader reader = new CauldronReader();
     if (File.Exists(savepath))
     {
         try
         {
             potions = reader.readFile(savepath);
             Console.WriteLine(potions.potions.Count + " potions have been loaded.");
         }
         catch (Exception e)
         {
             Console.WriteLine(e.Message);
         }
     }
     else
     {
         potions = reader.writeFile(savepath);
         Console.WriteLine("Basic potion file being created.");
         Console.WriteLine("1 potion containing regeneration for 30 seconds created.");
         Console.WriteLine("1 potion containing swiftness for 30 seconds created.");
     }
 }
開發者ID:Olink,項目名稱:Cauldron,代碼行數:26,代碼來源:Cauldron.cs

示例8: ItemDropLogPlugin

		public ItemDropLogPlugin(Main game) : base(game)
		{
			this._dropLocker = new object();
			this._drops = new ItemDrop[Main.item.Length];
			this._playerDropsPending = new List<ItemDrop>(Main.item.Length);
			this._ignoredItems = new List<Item>();
		}
開發者ID:Tygra,項目名稱:ItemDroplog,代碼行數:7,代碼來源:ItemDropLogPlugin.cs

示例9: TeamSpawn

 public TeamSpawn(Main game)
     : base(game)
 {
     config = Config.Read(savepath);
     config.Write(savepath);
     deadplayers = new Dictionary<int,int>(255);
 }
開發者ID:Olink,項目名稱:TeamSpawn,代碼行數:7,代碼來源:TeamSpawn.cs

示例10: InfiniteSigns

 public InfiniteSigns(Main game)
     : base(game)
 {
     for (int i = 0; i < 256; i++)
         Infos[i] = new PlayerInfo() { Index = i };
     Order = 1;
 }
開發者ID:MarioE,項目名稱:InfiniteSigns,代碼行數:7,代碼來源:InfiniteSigns.cs

示例11: PluginMain

 public PluginMain( Main game )
     : base(game)
 {
     Order = 1;
     Plrs = new List<Buffee>();
     GloballyBanned = new List<int>();
 }
開發者ID:SnirkImmington,項目名稱:RegionBuffs,代碼行數:7,代碼來源:PluginMain.cs

示例12: MAC

        public MAC(Main game)
            : base(game)
        {
            Order = -1;

            config = new MACconfig();
        }
開發者ID:Zaicon,項目名稱:MoreAdminCommandsV3,代碼行數:7,代碼來源:MoreAdminCommands.cs

示例13: InnerStart

        private static void InnerStart(string[] args)
        {
            try
            {
                Program.LaunchParameters = Utils.ParseArguements(args);
                ProgramServer.Game = new Main();
                string str = null;
                if (str != null)
                {
                    ProgramServer.Game.SetWorld(str);
                }
                try
                {
                    Console.WriteLine("TerrariaAPI Version: " + ServerApi.ApiVersion + " (Protocol {0} ({1}))", Terraria.Main.versionNumber2, Terraria.Main.curRelease);
                    Console.WriteLine("SendQ edition");
                    ServerApi.Initialize(args, Game);
                }
                catch (Exception ex)
                {
                    ServerApi.LogWriter.ServerWriteLine(
                        "Startup aborted due to an exception in the Server API initialization:\n" + ex, TraceLevel.Error);

                    Console.ReadLine();
                    return;
                }
                ProgramServer.Game.DedServ();
                ServerApi.DeInitialize();
            }
            catch (Exception exception1)
            {
                ServerApi.LogWriter.ServerWriteLine("Server crashed due to an unhandled exception:\n" + exception1, TraceLevel.Error);
            }
        }
開發者ID:hastinbe,項目名稱:TerrariaAPI-Server,代碼行數:33,代碼來源:ProgramServer.cs

示例14: SignCommands

        public SignCommands(Main game)
            : base(game)
        {
            getConfig = new scConfig();

            Order = 4;
        }
開發者ID:SnirkImmington,項目名稱:Essentials-SignCommands,代碼行數:7,代碼來源:scMain.cs

示例15: Jail

 public Jail(Main game)
     : base(game)
 {
     Order = 3;
     JPConfig = new JPConfigFile();
     Players = new Player[256];
 }
開發者ID:Kampfschaf,項目名稱:TSHOCK-Jail---Prison-Plugin,代碼行數:7,代碼來源:Jail.cs


注:本文中的Terraria.Main類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。