当前位置: 首页>>代码示例>>C#>>正文


C# Mod类代码示例

本文整理汇总了C#中Mod的典型用法代码示例。如果您正苦于以下问题:C# Mod类的具体用法?C# Mod怎么用?C# Mod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Mod类属于命名空间,在下文中一共展示了Mod类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NewDust

 public static int NewDust(Vector2 Position, int Width, int Height, Mod mod, string name, float SpeedX = 0f, float SpeedY = 0f, int Alpha = 0, Color newColor = default(Color), float Scale = 1f)
 {
     int dust = Dust.NewDust(Position, Width, Height, 0, SpeedX, SpeedY, Alpha, newColor, Scale);
     Main.dust[dust].modDust = mod.dusts[name];
     mod.dusts[name].OnSpawn(Main.dust[dust]);
     return dust;
 }
开发者ID:Exeton,项目名称:tModLoader,代码行数:7,代码来源:ModDust.cs

示例2: ExecuteTest3

        public void ExecuteTest3()
        {
            var exp = new Mod(new Number(0), new Number(5));
            var result = exp.Execute();

            Assert.Equal(0.0, result);
        }
开发者ID:sys27,项目名称:xFunc,代码行数:7,代码来源:ModTest.cs

示例3: ExecuteTest4

        public void ExecuteTest4()
        {
            var exp = new Mod(new Number(5), new Number(0));
            var result = exp.Execute();

            Assert.Equal(double.NaN, result);
        }
开发者ID:sys27,项目名称:xFunc,代码行数:7,代码来源:ModTest.cs

示例4: DesignTimeModLibraryViewModel

        public DesignTimeModLibraryViewModel() {
            var game = new Arma1Game(Guid.NewGuid(), new GameSettingsController());
            var collectionGroup = new ModLibraryGroupViewModel(this, "Collections",
                icon: SixIconFont.withSIX_icon_Folder);
            var collections =
                new CustomCollectionLibraryItemViewModel(this,
                    new CustomCollection(Guid.NewGuid(), game) {Name = "Test ModSet"},
                    collectionGroup);
            var subscribedCollections =
                new SubscribedCollectionLibraryItemViewModel(this,
                    new SubscribedCollection(Guid.NewGuid(), Guid.NewGuid(), game) {Name = "Test ModSet3"},
                    collectionGroup);
            var mod = new Mod(Guid.Empty) {
                Name = "@TESTMOD",
                FullName = "Da Full name fewafefiejaofijeafoijeafo ieafioj eaoi",
                Author = "The Author",
                Version = "1.2.0"
            };
            collections.Items.Add(new CustomCollection(Guid.NewGuid(), game) {
                Name = "Some ModSet wuith faopek faof aepokf poaefpokpof  eaf",
                Author = "Some author",
                Version = "1.0.2"
            });
            collections.Items.Add(mod);
            collections.SelectedItem = mod;

            // TODO
            //CreateItemsView(
            //    new ReactiveList<ContentLibraryItem>(new[]
            //    {subscribedCollections, sharedCollections, localCollections}), new LibraryGroup[0]);
            SelectedItem = collections;
        }
开发者ID:MaHuJa,项目名称:withSIX.Desktop,代码行数:32,代码来源:DesignTimeModLibraryViewModel.cs

示例5: ExecuteTest1

        public void ExecuteTest1()
        {
            var exp = new Mod(new Number(25), new Number(7));
            var result = exp.Execute();

            Assert.Equal(4.0, result);
        }
开发者ID:sys27,项目名称:xFunc,代码行数:7,代码来源:ModTest.cs

示例6: CreateModFile

		public static void CreateModFile( string ckDir, Mod mod )
		{
			FileInfo mpath = new FileInfo( ckDir + @"/mod/" + mod.ModFile );
			StreamWriter mw = new StreamWriter( mpath.Open( FileMode.Create, FileAccess.Write ), Encoding.GetEncoding( 1252 ) );

			mw.WriteLine( "name = \"" + mod.Name + "\"" );

			mw.WriteLine( "path = \"" + mod.Path + "\"" );

			mw.WriteLine();

			foreach( string e in mod.Extends )
				mw.WriteLine( "extend = \"" + e + "\"" );

			foreach( string e in mod.Replaces )
				mw.WriteLine( "replace_path = \"" + e + "\"" );

			if( mod.Dependencies.Count >= 0 )
			{
				mw.Write( "dependencies = {" );
				foreach( string s in mod.Dependencies )
					mw.Write( "\"" + s + "\" " );
				mw.WriteLine( "}" );
			}

			mw.Dispose();
		}
开发者ID:Measter,项目名称:TitleGenerator,代码行数:27,代码来源:MiscClasses.cs

示例7: IsPreinstalledMod

        /// <summary>Returns true if the mod is classified as a "preinstalled mod".</summary>
        public static bool IsPreinstalledMod(Mod mod)
        {
            var folderName = mod.Folder;

            return PreinstalledModsList.Contains(folderName) ||
                   OtherClassifiedAsPreinstalled.Contains(folderName);
        }
开发者ID:SneakyMax,项目名称:Cortex-Command-Mod-Manager,代码行数:8,代码来源:PreinstalledMods.cs

示例8: LoadModJSON

            private static void LoadModJSON(string[] modDirectories)
            {
                foreach (string modName in modDirectories)
                {
                    if (new DirectoryInfo(modName).Name == "Localization")
                    {
                        continue;
                    }
                    Mod m = new Mod(new DirectoryInfo(modName).Name);
                    string jsonFilename = modName + "/modinfo.json";
                    string rawJSON = JSONSystem.JSON.GetRawJSONFromFile(jsonFilename);
                    JSONNode output = JSONSystem.JSON.Parse(rawJSON);

                    JSONArray scripts = output["scripts"].AsArray;
                    foreach (JSONNode node in scripts)
                    {
                        m.AddScript(node);
                    }

                    JSONArray sprites = output["sprites"].AsArray;
                    foreach (JSONNode node in sprites)
                    {
                        m.AddSprite(node);
                    }
                    LoadGameModJSON(output, m);
                    AddMod(m);
                }
            }
开发者ID:Jay2645,项目名称:UnityHelperFunctions,代码行数:28,代码来源:ModLoaderBase.cs

示例9: AddIngredient

 public void AddIngredient(Mod mod, string itemName, int stack = 1)
 {
     if(mod == null)
     {
     mod = this.mod;
     }
     this.AddIngredient(mod.ItemType(itemName), stack);
 }
开发者ID:Exeton,项目名称:tModLoader,代码行数:8,代码来源:ModRecipe.cs

示例10: AddCraftGroup

 public void AddCraftGroup(Mod mod, string name, int stack = 1)
 {
     if (mod == null)
     {
         mod = this.mod;
     }
     this.AddCraftGroup(mod.GetCraftGroup(name), stack);
 }
开发者ID:guyde2011,项目名称:tModLoader,代码行数:8,代码来源:ModRecipe.cs

示例11: SetResult

 public void SetResult(Mod mod, string itemName, int stack = 1)
 {
     if(mod == null)
     {
         mod = this.mod;
     }
     this.SetResult(mod.ItemType(itemName), stack);
 }
开发者ID:MESSpace,项目名称:tModLoader,代码行数:8,代码来源:ModRecipe.cs

示例12: LoadMod

 public IEnumerable<ActivityItem> LoadMod(Mod mod)
 {
     foreach (var item in loadMod(mod.FullFolderPath))
     {
         item.Mod = mod;
         yield return item;
     }
 }
开发者ID:SneakyMax,项目名称:Cortex-Command-Mod-Manager,代码行数:8,代码来源:ModActivityItemsLoader.cs

示例13: ModHotkey

		internal string defaultKey; // from mod.Load
		//string configurationString; // Prevent 2 mods from having same hotkey

		public ModHotkey(string name, Mod mod, string defaultKey)
		{
			this.name = name;
			this.mod = mod;
			//this.currentKey = currentKey;
			this.defaultKey = defaultKey;
			this.displayName = mod.Name + ": " + name;
			//configurationString = mod.Name + "_" + "HotKey" + "_" + name.Replace(' ', '_');
		}
开发者ID:JavidPack,项目名称:TerraCustom,代码行数:12,代码来源:ModHotkey.cs

示例14: DesignTimeLicenseDialogViewModel

 public DesignTimeLicenseDialogViewModel() {
     var msLicense = new ModSetLicenses("Test Mod") {IsModSetLicensesExpanded = true};
     ModSetLicenses = new List<ModSetLicenses> {msLicense};
     var mod = new Mod(Guid.NewGuid()) {Name = "Test Mod", ModVersion = "1.0.0"};
     var ml = new ModLicense(null, String.Format("{0} {1}", mod.Name, mod.ModVersion)) {
         IsModLicenseExpanded = true
     };
     msLicense.ModLicenses.Add(ml);
 }
开发者ID:MaHuJa,项目名称:withSIX.Desktop,代码行数:9,代码来源:DesignTimeLicenseDialogViewModel.cs

示例15: BlockInfo

 public BlockInfo(DataTable dataTable, String name, ModList modList, Mod curMod)
 {
     data = dataTable;
     this.modList = modList;
     this.curMod = curMod;
     this.name = name;
     InitializeComponent();
     loadData();
 }
开发者ID:tboby,项目名称:BRModTools,代码行数:9,代码来源:BlockInfo.cs


注:本文中的Mod类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。