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


C# RoomItem.method_8方法代码示例

本文整理汇总了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);
                     });
                 }
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:20,代码来源:InteractorFreezeTile.cs

示例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;
        }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:22,代码来源:InteractorFreezeTile.cs

示例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); }
//.........这里部分代码省略.........
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:101,代码来源:InteractorFreezeTile.cs


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