本文整理汇总了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;
}
示例2: CanSpawn
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
//Needs to be adjusted later
return 0f;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例10: CanSpawn
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
return 0;
}
示例11: EditSpawnPool
public virtual void EditSpawnPool(IDictionary<int, float> pool, NPCSpawnInfo spawnInfo)
{
}
示例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;
}
示例13: NoZoneNormalSpawn
public static bool NoZoneNormalSpawn(NPCSpawnInfo spawnInfo)
{
return NormalSpawn(spawnInfo) && NoZone(spawnInfo);
}
示例14: NoZoneAllowWater
public static bool NoZoneAllowWater(NPCSpawnInfo spawnInfo)
{
return !spawnInfo.sky && !spawnInfo.player.ZoneMeteor && !spawnInfo.spiderCave;
}
示例15: NoZone
public static bool NoZone(NPCSpawnInfo spawnInfo)
{
return NoZoneAllowWater(spawnInfo) && !spawnInfo.water;
}