Example #1
0
        public void ImportEvents(List <MapEvent> cfgList, FTWorldMap worldMap)
        {
            FTGroupEvent group = worldMap.GetGroup <FTGroupEvent>();

            for (int i = 0; i < cfgList.Count; i++)
            {
                MapEvent     d    = cfgList[i];
                EFTEventType t    = (EFTEventType)d.EventType;
                Type         type = Type.GetType("MAP." + t.ToString());
                group.AddEvent(type);
            }
        }
Example #2
0
        public override void Import(DCFG cfg)
        {
            MapStep data = cfg as MapStep;

            this.ID       = data.ID;
            this.StepName = data.StepName;
            FTGroupEvent group = Map.GetGroup <FTGroupEvent>();

            for (int i = 0; i < data.StepEvents.Count; i++)
            {
                FTEvent e = group.GetElement(data.StepEvents[i]);
                if (e != null)
                {
                    StepEvents.Add(e);
                }
            }
        }
Example #3
0
        public override void Import(DCFG cfg)
        {
            MapTimer data = cfg as MapTimer;

            this.ID           = data.ID;
            this.TriggerTime  = data.TriggerTime;
            this.TriggerLoops = data.TriggerLoops;
            FTGroupEvent group = Map.GetGroup <FTGroupEvent>();

            for (int i = 0; i < data.TriggerEvents.Count; i++)
            {
                FTEvent e = group.GetElement(data.TriggerEvents[i]);
                if (e != null)
                {
                    TriggerEvents.Add(e);
                }
            }
        }
Example #4
0
        public override void Import(DCFG cfg)
        {
            MapArea data = cfg as MapArea;

            this.ID         = data.ID;
            this.Name       = data.Name;
            this.Pos        = data.Pos;
            this.Scale      = data.Scale;
            this.Shape      = (EAreaShape)data.Shape;
            this.AllowRide  = data.AllowRide;
            this.AllowPK    = data.AllowPK;
            this.AllowTrade = data.AllowTrade;
            FTGroupEvent group = Map.GetGroup <FTGroupEvent>();

            for (int i = 0; i < data.Events.Count; i++)
            {
                FTEvent e = group.GetElement(data.Events[i]);
                if (e != null)
                {
                    Events.Add(e);
                }
            }
        }