本文整理匯總了C#中Terraria.Tile.halfBrick方法的典型用法代碼示例。如果您正苦於以下問題:C# Tile.halfBrick方法的具體用法?C# Tile.halfBrick怎麽用?C# Tile.halfBrick使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Terraria.Tile
的用法示例。
在下文中一共展示了Tile.halfBrick方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SolidTile
public static bool SolidTile(Tile testTile)
{
try
{
if (testTile == null)
{
bool result = true;
return result;
}
if (testTile.active() && Main.tileSolid[(int)testTile.type] && !Main.tileSolidTop[(int)testTile.type] && !testTile.halfBrick() && testTile.slope() == 0 && !testTile.inActive())
{
bool result = true;
return result;
}
}
catch
{
}
return false;
}
示例2: isTheSameAs
public bool isTheSameAs(Tile compTile)
{
if (compTile == null)
{
return false;
}
if (this.active() != compTile.active())
{
return false;
}
if (this.active())
{
if (this.type != compTile.type)
{
return false;
}
if (Main.tileFrameImportant[(int)this.type])
{
if (this.frameX != compTile.frameX)
{
return false;
}
if (this.frameY != compTile.frameY)
{
return false;
}
}
}
if (this.wall != compTile.wall)
{
return false;
}
if (this.liquid != compTile.liquid)
{
return false;
}
if (this.liquid > 0)
{
if (this.lava() != compTile.lava())
{
return false;
}
if (this.honey() != compTile.honey())
{
return false;
}
}
return this.wire() == compTile.wire() && this.wire2() == compTile.wire2() && this.wire3() == compTile.wire3() && this.halfBrick() == compTile.halfBrick() && this.actuator() == compTile.actuator() && this.inActive() == compTile.inActive() && this.wallColor() == compTile.wallColor() && this.color() == compTile.color() && this.slope() == compTile.slope();
}
示例3: validateWorld
//.........這裏部分代碼省略.........
}
if (num <= 25)
{
binaryReader.ReadBoolean();
}
if (binaryReader.ReadBoolean())
{
tile.wall = binaryReader.ReadByte();
if (num >= 48 && binaryReader.ReadBoolean())
{
tile.wallColor(binaryReader.ReadByte());
}
}
if (binaryReader.ReadBoolean())
{
tile.liquid = binaryReader.ReadByte();
tile.lava(binaryReader.ReadBoolean());
if (num >= 51)
{
tile.honey(binaryReader.ReadBoolean());
}
}
if (num >= 33)
{
tile.wire(binaryReader.ReadBoolean());
}
if (num >= 43)
{
tile.wire2(binaryReader.ReadBoolean());
tile.wire3(binaryReader.ReadBoolean());
}
if (num >= 41)
{
tile.halfBrick(binaryReader.ReadBoolean());
if (!Main.tileSolid[(int)tile.type])
{
tile.halfBrick(false);
}
if (num >= 49)
{
tile.slope(binaryReader.ReadByte());
if (!Main.tileSolid[(int)tile.type])
{
tile.slope(0);
}
}
}
if (num >= 42)
{
tile.actuator(binaryReader.ReadBoolean());
tile.inActive(binaryReader.ReadBoolean());
}
if (num >= 25)
{
int num6 = (int)binaryReader.ReadInt16();
j += num6;
}
}
}
int num7 = 40;
if (num < 58)
{
num7 = 20;
}
for (int k = 0; k < 1000; k++)
{
示例4: AnchorValid
public static bool AnchorValid(Tile tileCache, AnchorType anchor)
{
bool flag = false;
if (tileCache.nactive())
{
if ((anchor & AnchorType.SolidTile) == AnchorType.SolidTile && Main.tileSolid[(int)tileCache.type] && !Main.tileSolidTop[(int)tileCache.type] && !Main.tileNoAttach[(int)tileCache.type] && tileCache.blockType() == 0)
{
flag = true;
}
if ((anchor & AnchorType.SolidBottom) == AnchorType.SolidBottom && !Main.tileNoAttach[(int)tileCache.type] && ((Main.tileSolid[(int)tileCache.type] && (!Main.tileSolidTop[(int)tileCache.type] || (tileCache.type == 19 && (tileCache.halfBrick() || tileCache.topSlope())))) || tileCache.topSlope() || tileCache.halfBrick()) && !TileID.Sets.NotReallySolid[(int)tileCache.type] && !tileCache.bottomSlope())
{
flag = true;
}
if (!flag && ((anchor & AnchorType.SolidWithTop) == AnchorType.SolidWithTop || (anchor & AnchorType.Table) == AnchorType.Table))
{
if (tileCache.type == 19)
{
int num = (int)tileCache.frameX / TileObjectData.PlatformFrameWidth();
if ((!tileCache.halfBrick() && num >= 0 && num <= 7) || (num >= 12 && num <= 16) || (num >= 25 && num <= 26))
{
flag = true;
}
}
else if (Main.tileSolid[(int)tileCache.type] && Main.tileSolidTop[(int)tileCache.type])
{
flag = true;
}
}
if (!flag && (anchor & AnchorType.Table) == AnchorType.Table && tileCache.type != 19 && Main.tileTable[(int)tileCache.type] && tileCache.blockType() == 0)
{
flag = true;
}
if (!flag && (anchor & AnchorType.SolidSide) == AnchorType.SolidSide && Main.tileSolid[(int)tileCache.type] && !Main.tileSolidTop[(int)tileCache.type])
{
switch (tileCache.blockType())
{
case 4:
case 5:
flag = true;
break;
}
}
}
else if (!flag && (anchor & AnchorType.EmptyTile) == AnchorType.EmptyTile)
{
flag = true;
}
return flag;
}
示例5: Tile
private void Tile(Tile tile)
{
byte flags = 0;
var active = tile.active();
var wall = tile.wall;
var liquid = tile.liquid;
if (active) flags += 1;
//if (tile.Lighted) flags += 2; //UNUSED
if (wall > 0) flags += 4;
if (liquid > 0) flags += 8;
if (tile.wire()) flags += 16;
if (tile.halfBrick()) flags += 32;
if (tile.actuator()) flags += 64;
if (tile.inActive()) flags += 128;
Byte(flags);
byte tileColour = 0, wallColour = 0;
flags = 0;
if (tile.wire2()) flags += 1;
if (tile.wire3()) flags += 2;
if (tile.active() && tile.color() > 0)
{
flags += 4;
tileColour = tile.color();
}
if (tile.wall > 0 && tile.wallColor() > 0)
{
flags += 8;
wallColour = tile.wallColor();
}
Byte(flags + (byte)(tile.slope() << 4));
if (tileColour > 0) Byte(tileColour);
if (wallColour > 0) Byte(wallColour);
if (tile.active())
{
UShort(tile.type);
if (Main.tileFrameImportant[(int)tile.type])
{
Short(tile.frameX);
Short(tile.frameY);
}
}
if (tile.wall > 0) Byte(tile.wall);
if (tile.liquid > 0)
{
Byte(tile.liquid);
Byte(tile.liquidType());
}
}