Beispiel #1
0
        public void MovePoint(SectionPicking.PickingInfo pick_info, Vector3 position)
        {
            switch (pick_info.Section)
            {
            case Sections.LocalMap:
                if (pick_info.PointID == PointID.Left)
                {
                    LocalMap.BottomLeftX = position.X;
                    LocalMap.BottomLeftZ = position.Z;
                }
                else
                {
                    LocalMap.TopRightX = position.X;
                    LocalMap.TopRightZ = position.Z;
                }
                break;

            case Sections.GlobalMap:
                if (pick_info.PointID == PointID.Left)
                {
                    GlobalMap.BottomLeftX = position.X;
                    GlobalMap.BottomLeftZ = position.Z;
                }
                else
                {
                    GlobalMap.TopRightX = position.X;
                    GlobalMap.TopRightZ = position.Z;
                }
                break;
            }
        }
Beispiel #2
0
        public void MovePointY(SectionPicking.PickingInfo pick_info, float height)
        {
            switch (pick_info.Section)
            {
            case Sections.StartPositions:
                StartPositions.Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.EnemyRoutes:
                EnemyRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.ItemRoutes:
                ItemRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.GliderRoutes:
                GliderRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.Routes:
                Routes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.Objects:
                Objects.Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.RespawnPoints:
                RespawnPoints.Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.Area:
                Area.Entries[pick_info.EntryID].PositionY = height;
                break;

            case Sections.Camera:
                Camera.Entries[pick_info.EntryID].PositionY = height;
                break;
            }
        }
Beispiel #3
0
        public object GetPoint(SectionPicking.PickingInfo pick_info)
        {
            switch (pick_info.Section)
            {
            case Sections.StartPositions:
                return(StartPositions.Entries[pick_info.EntryID]);

            case Sections.EnemyRoutes:
                return(EnemyRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID]);

            case Sections.ItemRoutes:
                return(ItemRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID]);

            case Sections.GliderRoutes:
                return(GliderRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID]);

            case Sections.Routes:
                return(Routes.Entries[pick_info.GroupID].Entries[pick_info.EntryID]);

            case Sections.CheckPoints:
                return(CheckPoints.Entries[pick_info.GroupID].Entries[pick_info.EntryID]);

            case Sections.Objects:
                return(Objects.Entries[pick_info.EntryID]);

            case Sections.RespawnPoints:
                return(RespawnPoints.Entries[pick_info.EntryID]);

            case Sections.Area:
                return(Area.Entries[pick_info.EntryID]);

            case Sections.Camera:
                return(Camera.Entries[pick_info.EntryID]);

            case Sections.StageInformation:
                return(StageInformation.Entries[pick_info.EntryID]);

            default:
                return(null);
            }
        }
Beispiel #4
0
        public ISectionBase GetSection(SectionPicking.PickingInfo pick_info)
        {
            switch (pick_info.Section)
            {
            case Sections.StartPositions:
                return(StartPositions);

            case Sections.EnemyRoutes:
                return(EnemyRoutes);

            case Sections.ItemRoutes:
                return(ItemRoutes);

            case Sections.GliderRoutes:
                return(GliderRoutes);

            case Sections.Routes:
                return(Routes);

            case Sections.CheckPoints:
                return(CheckPoints);

            case Sections.Objects:
                return(Objects);

            case Sections.RespawnPoints:
                return(RespawnPoints);

            case Sections.Area:
                return(Area);

            case Sections.Camera:
                return(Camera);

            case Sections.StageInformation:
                return(StageInformation);

            default:
                return(null);
            }
        }
Beispiel #5
0
        public void MovePoint(SectionPicking.PickingInfo pick_info, Vector3 position)
        {
            ViewPlaneHandler vph = (Application.OpenForms[0] as Form1).vph;
            Vector3          res;

            switch (pick_info.Section)
            {
            case Sections.StartPositions:
                res = StartPositions.Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                StartPositions.Entries[pick_info.EntryID].Pos = res;
                break;

            case Sections.EnemyRoutes:
                res = EnemyRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                EnemyRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos = res;
                break;

            case Sections.ItemRoutes:
                res = ItemRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                ItemRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos = res;
                break;

            case Sections.GliderRoutes:
                res = GliderRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                GliderRoutes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos = res;
                break;

            case Sections.Routes:
                res = Routes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                Routes.Entries[pick_info.GroupID].Entries[pick_info.EntryID].Pos = res;
                break;

            case Sections.CheckPoints:
                if (vph.mode != ViewPlaneHandler.PLANE_MODES.XZ)
                {
                    break;
                }
                if (pick_info.PointID == PointID.Left)
                {
                    CheckPoints.Entries[pick_info.GroupID].Entries[pick_info.EntryID].LeftPointX = position.X;
                    CheckPoints.Entries[pick_info.GroupID].Entries[pick_info.EntryID].LeftPointZ = position.Z;
                }
                else
                {
                    CheckPoints.Entries[pick_info.GroupID].Entries[pick_info.EntryID].RightPointX = position.X;
                    CheckPoints.Entries[pick_info.GroupID].Entries[pick_info.EntryID].RightPointZ = position.Z;
                }
                break;

            case Sections.Objects:
                res = Objects.Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                Objects.Entries[pick_info.EntryID].Pos = res;
                break;

            case Sections.RespawnPoints:
                res = RespawnPoints.Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                RespawnPoints.Entries[pick_info.EntryID].Pos = res;
                break;

            case Sections.Area:
                if (vph.mode != ViewPlaneHandler.PLANE_MODES.XZ)
                {
                    break;
                }
                Area.Entries[pick_info.EntryID].PositionX = position.X;
                Area.Entries[pick_info.EntryID].PositionZ = position.Z;
                break;

            case Sections.Camera:
                res = Camera.Entries[pick_info.EntryID].Pos;
                vph.storePlane(ref res, position);
                Camera.Entries[pick_info.EntryID].Pos = res;
                break;
            }
        }