本文整理汇总了C#中RoomItem.method_8方法的典型用法代码示例。如果您正苦于以下问题:C# RoomItem.method_8方法的具体用法?C# RoomItem.method_8怎么用?C# RoomItem.method_8使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RoomItem
的用法示例。
在下文中一共展示了RoomItem.method_8方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FreezeUser
public void FreezeUser(RoomItem Item, RoomItem Item2)
{
if (Item.method_8().frzTimer == true)
{
for (int i = 0; i < Item.method_8().RoomUser_0.Length; i++)
{
RoomUser User2 = Item.method_8().RoomUser_0[i];
if (User2 != null)
{
if (User2.int_3 == Item2.Int32_0 && User2.int_4 == Item2.Int32_1)
{
ThreadPool.QueueUserWorkItem(o =>
{
Item.method_8().GetFreeze().FreezeUser(User2);
});
}
}
}
}
}
示例2: BreakIceBlock
public bool BreakIceBlock(RoomItem Item, RoomItem Item2)
{
if (Item.method_8().frzTimer == true)
{
Item2.ExtraData = "11200";
Item2.UpdateState(false, true);
int rand = GoldTreeEnvironment.GetRandomNumber(1, 11);
foreach (RoomItem Item3 in Item.method_8().GetFreeze().freezeBlocks.Values)
{
if (Item2.Int32_0 == Item3.Int32_0 && Item2.Int32_1 == Item3.Int32_1)
{
if (string.IsNullOrEmpty(Item3.ExtraData))
{
Item3.method_8().GetFreeze().SetRandomPowerUp(Item3);
return true;
}
}
}
}
return false;
}
示例3: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
{
Room @class = Item.method_8();
RoomUser User = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (User.Freezed == false)
{
if (User.team != Rooms.Games.Team.None)
{
if (Item.method_8().frzTimer == true)
{
if (Item.Int32_0 == User.int_3 || Item.Int32_0 - 1 == User.int_3 || Item.Int32_0 + 1 == User.int_3)
{
if (Item.Int32_1 == User.int_4 || Item.Int32_1 - 1 == User.int_4 || Item.Int32_1 + 1 == User.int_4)
{
ThreadPool.QueueUserWorkItem(o =>
{
if (User.FreezeBalls > 0)
{
Rooms.Games.FreezePowerUp BallType = User.freezePowerUp;
User.freezePowerUp = Rooms.Games.FreezePowerUp.None;
bool pX, pY, pD1, pD2, nX, nY, nD1, nD2;
pX = false; pY = false; pD1 = false; pD2 = false; nX = false; nY = false; nD1 = false; nD2 = false;
if (BallType == Rooms.Games.FreezePowerUp.OrangeSnowball)
{
User.FreezeBalls -= 1;
Item.ExtraData = "6000";
Item.UpdateState(false, true);
Thread.Sleep(2000);
BreakIceBlock(Item, Item);
FreezeUser(Item, Item);
}
else
{
User.FreezeBalls -= 1;
Item.ExtraData = "1000";
Item.UpdateState(false, true);
Thread.Sleep(2000);
BreakIceBlock(Item, Item);
FreezeUser(Item, Item);
}
if (BallType == Rooms.Games.FreezePowerUp.None)
{
BallType = Rooms.Games.FreezePowerUp.None;
for (int i = 1; i < 20; i++)
{
if (User.FreezeRange >= i)
{
Thread.Sleep(200);
foreach (RoomItem Item2 in Item.method_8().GetFreeze().freezeTiles.Values)
{
if (Item2.Int32_0 == Item.Int32_0 && Item2.Int32_1 == Item.Int32_1 + i && !pX) { pX = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 && Item2.Int32_1 == Item.Int32_1 - i && !pY) { pY = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 + i && Item2.Int32_1 == Item.Int32_1 && !nX) { nX = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 - i && Item2.Int32_1 == Item.Int32_1 && !nY) { nY = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
}
}
}
}
else if (BallType == Rooms.Games.FreezePowerUp.GreenArrow)
{
BallType = Rooms.Games.FreezePowerUp.None;
for (int i = 1; i < 20; i++)
{
if (User.FreezeRange >= i)
{
Thread.Sleep(200);
foreach (RoomItem Item2 in Item.method_8().GetFreeze().freezeTiles.Values)
{
if (Item2.Int32_0 == Item.Int32_0 + i && Item2.Int32_1 == Item.Int32_1 + i && !pD1) { pD1 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 + i && Item2.Int32_1 == Item.Int32_1 - i && !nD1) { nD1 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 - i && Item2.Int32_1 == Item.Int32_1 + i && !pD2) { pD2 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 - i && Item2.Int32_1 == Item.Int32_1 - i && !nD2) { nD2 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
}
}
}
}
else if (BallType == Rooms.Games.FreezePowerUp.OrangeSnowball)
{
BallType = Rooms.Games.FreezePowerUp.None;
for (int i = 1; i < 20; i++)
{
if (User.FreezeRange >= i)
{
Thread.Sleep(200);
foreach (RoomItem Item2 in Item.method_8().GetFreeze().freezeTiles.Values)
{
if (Item2.Int32_0 == Item.Int32_0 && Item2.Int32_1 == Item.Int32_1 + i && !pX) { pX = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 && Item2.Int32_1 == Item.Int32_1 - i && !pY) { pY = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 + i && Item2.Int32_1 == Item.Int32_1 && !nX) { nX = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 - i && Item2.Int32_1 == Item.Int32_1 && !nY) { nY = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 + i && Item2.Int32_1 == Item.Int32_1 + i && !pD1) { pD1 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 + i && Item2.Int32_1 == Item.Int32_1 - i && !nD1) { nD1 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 - i && Item2.Int32_1 == Item.Int32_1 + i && !pD2) { pD2 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
if (Item2.Int32_0 == Item.Int32_0 - i && Item2.Int32_1 == Item.Int32_1 - i && !nD2) { nD2 = BreakIceBlock(Item, Item2); FreezeUser(Item, Item2); }
//.........这里部分代码省略.........