Пример #1
0
        public override Entity loadConfig(ConfuseSection sect)
        {
            LightEntity ent = new LightEntity();
            ent.Type = types[0];

            ent.X = sect.get_int("x", 0);
            ent.Y = sect.get_int("y", 0);

            return ent;
        }
Пример #2
0
        public override Entity loadConfig(ConfuseSection sect)
        {
            ZoneEntity ent = new ZoneEntity();
            ent.Type = types[0];

            ent.Width = sect.get_int("width", 20);
            ent.Height = sect.get_int("height", 20);
            ent.X = sect.get_int("x", 0);
            ent.Y = sect.get_int("y", 0);
            ent.Angle = sect.get_int("angle", 0);

            return ent;
        }
Пример #3
0
        public override Entity loadConfig(ConfuseSection sect)
        {
            ObjectEntity ent = new ObjectEntity();

            // find type
            string type = sect.get_string("type", "");
            foreach (EntityType ty in this.types) {
                if (ty.Name == type) {
                    ent.Type = ty;
                    break;
                }
            }
            if (ent.Type == null) return null;

            // load other deets
            ent.X = sect.get_int("x", 0);
            ent.Y = sect.get_int("y", 0);

            return ent;
        }