Пример #1
0
        private void AddSpecialItems(Item item)
        {
            switch (item.GetBaseItem().InteractionType)
            {
            case InteractionType.FootballGate:

                //IsTrans = true;
                _room.GetSoccer().RegisterGate(item);
                var splittedExtraData = item.ExtraData.Split(':');
                if (string.IsNullOrEmpty(item.ExtraData) || splittedExtraData.Length <= 1)
                {
                    item.Gender = "M";
                    switch (item.Team)
                    {
                    case TEAM.YELLOW:
                        item.Figure = "lg-275-93.hr-115-61.hd-207-14.ch-265-93.sh-305-62";
                        break;

                    case TEAM.RED:
                        item.Figure = "lg-275-96.hr-115-61.hd-180-3.ch-265-96.sh-305-62";
                        break;

                    case TEAM.GREEN:
                        item.Figure = "lg-275-102.hr-115-61.hd-180-3.ch-265-102.sh-305-62";
                        break;

                    case TEAM.BLUE:
                        item.Figure = "lg-275-108.hr-115-61.hd-180-3.ch-265-108.sh-305-62";
                        break;
                    }
                }
                else
                {
                    item.Gender = splittedExtraData[0];
                    item.Figure = splittedExtraData[1];
                }

                break;

            case InteractionType.Banzaifloor:
            {
                _room.GetBanzai().AddTile(item, item.Id);
                break;
            }

            case InteractionType.Banzaipyramid:
            {
                _room.GetGameItemHandler().AddPyramid(item, item.Id);
                break;
            }

            case InteractionType.Banzaitele:
            {
                _room.GetGameItemHandler().AddTeleport(item, item.Id);
                item.ExtraData = "";
                break;
            }

            case InteractionType.Banzaipuck:
            {
                _room.GetBanzai().AddPuck(item);
                break;
            }

            case InteractionType.Football:
            {
                _room.GetSoccer().AddBall(item);
                break;
            }

            case InteractionType.FreezeTileBlock:
            {
                _room.GetFreeze().AddFreezeBlock(item);
                break;
            }

            case InteractionType.FreezeTile:
            {
                _room.GetFreeze().AddFreezeTile(item);
                break;
            }

            case InteractionType.Freezeexit:
            {
                _room.GetFreeze().AddExitTile(item);
                break;
            }
            }
        }
Пример #2
0
        private void AddSpecialItems(Item item)
        {
            switch (item.GetBaseItem().InteractionType)
            {
            case InteractionType.FOOTBALL_GATE:
                //IsTrans = true;
                _room.GetSoccer().RegisterGate(item);


                string[] splittedExtraData = item.ExtraData.Split(':');

                if (string.IsNullOrEmpty(item.ExtraData) || splittedExtraData.Length <= 1)
                {
                    item.Gender = "M";
                    switch (item.team)
                    {
                    case Team.Yellow:
                        item.Figure = "lg-275-93.hr-115-61.hd-207-14.ch-265-93.sh-305-62";
                        break;

                    case Team.Red:
                        item.Figure = "lg-275-96.hr-115-61.hd-180-3.ch-265-96.sh-305-62";
                        break;

                    case Team.Green:
                        item.Figure = "lg-275-102.hr-115-61.hd-180-3.ch-265-102.sh-305-62";
                        break;

                    case Team.Blue:
                        item.Figure = "lg-275-108.hr-115-61.hd-180-3.ch-265-108.sh-305-62";
                        break;
                    }
                }
                else
                {
                    item.Gender = splittedExtraData[0];
                    item.Figure = splittedExtraData[1];
                }
                break;

            case InteractionType.banzaifloor:
            {
                _room.GetBanzai().AddTile(item, item.Id);
                break;
            }

            case InteractionType.banzaipyramid:
            {
                _room.GetGameItemHandler().AddPyramid(item, item.Id);
                break;
            }

            case InteractionType.banzaitele:
            {
                _room.GetGameItemHandler().AddTeleport(item, item.Id);
                item.ExtraData = "";
                break;
            }

            case InteractionType.banzaipuck:
            {
                _room.GetBanzai().AddPuck(item);
                break;
            }

            case InteractionType.FOOTBALL:
            {
                _room.GetSoccer().AddBall(item);
                break;
            }

            case InteractionType.FREEZE_TILE_BLOCK:
            {
                _room.GetFreeze().AddFreezeBlock(item);
                break;
            }

            case InteractionType.FREEZE_TILE:
            {
                _room.GetFreeze().AddFreezeTile(item);
                break;
            }

            case InteractionType.freezeexit:
            {
                _room.GetFreeze().AddExitTile(item);
                break;
            }
            }
        }