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


C# ModLoader.NPCSpawnInfo类代码示例

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


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

示例1: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     return Main.bloodMoon && spawnInfo.spawnTileY < Main.rockLayer && !Main.dayTime ? 0.1f : 0f;
 }
开发者ID:ColinAV516,项目名称:EnergyMod,代码行数:4,代码来源:BloodrockElemental.cs

示例2: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     //Needs to be adjusted later
     return 0f;
 }
开发者ID:ColinAV516,项目名称:Spirit-Mod,代码行数:5,代码来源:UnstableWisp.cs

示例3: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     int x = spawnInfo.spawnTileX;
     int y = spawnInfo.spawnTileY;
     int tile = (int)Main.tile[x, y].type;
     return (ExampleMod.NormalSpawn(spawnInfo) && (tile == 53 || tile == 112 || tile == 116 || tile == 234) && ExampleMod.NoZoneAllowWater(spawnInfo) && spawnInfo.water) && y < Main.rockLayer && (x < 250 || x > Main.maxTilesX - 250) && !spawnInfo.playerSafe && NPC.downedGolemBoss ? 0.5f : 0f;
 }
开发者ID:digitalseraphim,项目名称:tModLoader,代码行数:7,代码来源:Octopus.cs

示例4: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     int x = spawnInfo.spawnTileX;
     int y = spawnInfo.spawnTileY;
     int tile = (int)Main.tile[x, y].type;
     return (tile == 2) && spawnInfo.spawnTileY < Main.rockLayer && !Main.dayTime ? 0.01f : 0f;
 }
开发者ID:ColinAV516,项目名称:EnergyMod,代码行数:7,代码来源:KillerBunny.cs

示例5: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     int x = spawnInfo.spawnTileX;
     int y = spawnInfo.spawnTileY;
     int tile = (int)Main.tile[x, y].type;
     return spawnInfo.player.ZoneJungle && spawnInfo.spawnTileY < Main.rockLayer && (tile == 60) && !Main.dayTime ? 0.1f : 0f;
 }
开发者ID:ColinAV516,项目名称:EnergyMod,代码行数:7,代码来源:MudMonster.cs

示例6: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     int x = spawnInfo.spawnTileX;
     int y = spawnInfo.spawnTileY;
     int tile = (int)Main.tile[x, y].type;
     return (tile == 147) && !Main.bloodMoon && spawnInfo.player.ZoneSnow && spawnInfo.spawnTileY < Main.rockLayer && !Main.dayTime ? 0.1f : 0f;
 }
开发者ID:ColinAV516,项目名称:EnergyMod,代码行数:7,代码来源:BorealTreeMan.cs

示例7: CanSpawn

        public override float CanSpawn(NPCSpawnInfo spawnInfo)
        {
            if (NPC.AnyNPCs(mod.NPCType("WispQueen")) && Gyrolite.NoBiome(spawnInfo))
                return 10;
            if (Gyrolite.NoInvasion(spawnInfo) && Gyrolite.NoBiome(spawnInfo))
                return 0.5F;

            return 0;
        }
开发者ID:Eldrazi,项目名称:Gyrolite,代码行数:9,代码来源:WoodWisp.cs

示例8: CanSpawn

        public override float CanSpawn(NPCSpawnInfo spawnInfo)
        {
            if (NPC.AnyNPCs(mod.NPCType("WispQueen")) && spawnInfo.player.ZoneDesert)
                return 10;
            if (Gyrolite.NoInvasion(spawnInfo) && spawnInfo.player.ZoneDesert)
                return 0.5F;

            return 0;
        }
开发者ID:Eldrazi,项目名称:Gyrolite,代码行数:9,代码来源:PalmwoodWisp.cs

示例9: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     Tile tile = Main.tile[spawnInfo.spawnTileX, spawnInfo.spawnTileY];
     return ExampleMod.NoZoneNormalSpawn(spawnInfo) && (tile.type == 53 || tile.type == 112 || tile.type == 116 || tile.type == 234 || spawnInfo.desertCave) && !spawnInfo.playerSafe && NPC.downedGolemBoss ? 0.5f : 0f;
 }
开发者ID:digitalseraphim,项目名称:tModLoader,代码行数:5,代码来源:Sarcophagus.cs

示例10: CanSpawn

 public override float CanSpawn(NPCSpawnInfo spawnInfo)
 {
     return 0;
 }
开发者ID:Eldrazi,项目名称:Gyrolite,代码行数:4,代码来源:Jeruasashin.cs

示例11: EditSpawnPool

		public virtual void EditSpawnPool(IDictionary<int, float> pool, NPCSpawnInfo spawnInfo)
		{
		}
开发者ID:JavidPack,项目名称:TerraCustom,代码行数:3,代码来源:GlobalNPC.cs

示例12: NoBiome

 public static bool NoBiome(NPCSpawnInfo spawnInfo)
 {
     Player player = spawnInfo.player;
     return !player.ZoneJungle && !player.ZoneDungeon && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneSnow && !player.ZoneUndergroundDesert;
 }
开发者ID:Eldrazi,项目名称:Gyrolite,代码行数:5,代码来源:Gyrolite.cs

示例13: NoZoneNormalSpawn

 public static bool NoZoneNormalSpawn(NPCSpawnInfo spawnInfo)
 {
     return NormalSpawn(spawnInfo) && NoZone(spawnInfo);
 }
开发者ID:trekko727,项目名称:tModLoader,代码行数:4,代码来源:ExampleMod.cs

示例14: NoZoneAllowWater

 public static bool NoZoneAllowWater(NPCSpawnInfo spawnInfo)
 {
     return !spawnInfo.sky && !spawnInfo.player.ZoneMeteor && !spawnInfo.spiderCave;
 }
开发者ID:trekko727,项目名称:tModLoader,代码行数:4,代码来源:ExampleMod.cs

示例15: NoZone

 public static bool NoZone(NPCSpawnInfo spawnInfo)
 {
     return NoZoneAllowWater(spawnInfo) && !spawnInfo.water;
 }
开发者ID:trekko727,项目名称:tModLoader,代码行数:4,代码来源:ExampleMod.cs


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