当前位置: 首页>>代码示例>>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;未经允许,请勿转载。