Exemple #1
0
        public MapData(string id)
        {
            this.id = id;
            Hashtable def = Defs.GetMap(this.id);

            this.startCountDown      = def.GetInt("start_count_down");
            this.scale               = def.GetFVec3("scale");
            this.offset              = def.GetFVec3("offset");
            this.row                 = MathUtils.Max(3, def.GetInt("row"));
            this.col                 = MathUtils.Max(3, def.GetInt("col"));
            this.startPointPlace     = def.GetFVec2("start_point_place");
            this.startIndex          = def.GetInt("start_index");
            this.endIndex            = def.GetInt("end_index");
            this.camOffset           = def.GetFVec3("cam_offset");
            this.camLookAtOffset     = def.GetFVec3("cam_lookat_offset");
            this.camSmooth           = def.GetFix64("cam_smooth");
            this.FOWFogFrequency     = def.GetFix64("FOW_fog_frequency");
            this.FOWFogAmplitude     = def.GetFix64("FOW_fog_amplitude");
            this.FOWDistanceToPlayer = def.GetFix64("FOW_distance_to_player");
            this.items               = def.GetStringArray("items");
            this.maxItemCount        = def.GetInt("max_item_count");
            this.itemUpdateInterval  = def.GetFix64Array("item_update_interval");
            this.bgSnd               = def.GetString("bg_snd");
            this.countDownSnd        = def.GetString("count_down_snd");
            this.winSnd              = def.GetString("win_snd");
            this.loseSnd             = def.GetString("lose_snd");
            this.surfaceMat          = def.GetString("surface_mat");
        }
        public EffectData(string id)
        {
            this.id = id;
            Hashtable def = Defs.GetEffect(this.id);

            this.model           = def.GetString("model");
            this.trackMode       = ( TrackMode )def.GetInt("track_mode");
            this.dissipatingMode = ( DissipatingMode )def.GetInt("dissipating_mode");
            this.duration        = def.GetFloat("duration");
        }
Exemple #3
0
        public BuffData(string id)
        {
            this.id = id;
            Hashtable def = Defs.GetBuff(this.id);

            this.conflicts = def.GetStringArray("conflicts");
            this.attrs     = def.GetIntArray("attrs").Cast <Attr>().ToArray();
            this.values    = def.GetFix64Array("values");
            this.duration  = def.GetFix64("duration");
            this.fx        = def.GetString("fx");
            this.snd       = def.GetString("snd");
        }
        public EntityData(string id)
        {
            this.id = id;
            Hashtable def = Defs.GetEntity(this.id);

            this.name         = def.GetString("name");
            this.model        = def.GetString("model");
            this.naturalSpeed = def.GetFix64("natural_speed");
            FVec3 size = def.GetFVec3("size");

            this.bounds        = new FBounds(new FVec3(Fix64.Zero, size.y * Fix64.Half, Fix64.Zero), size);
            this.fov           = def.GetFix64("fov");
            this.triggerRadius = def.GetFix64("trigger_raduis");
            Hashtable triggerDef = def.GetMap("trigger");

            if (triggerDef != null)
            {
                this.trigger = new TriggerData(triggerDef);
            }
        }