当前位置: 首页>>代码示例>>C#>>正文


C# IConfig.GetFloat方法代码示例

本文整理汇总了C#中IConfig.GetFloat方法的典型用法代码示例。如果您正苦于以下问题:C# IConfig.GetFloat方法的具体用法?C# IConfig.GetFloat怎么用?C# IConfig.GetFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IConfig的用法示例。


在下文中一共展示了IConfig.GetFloat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialise

 public void Initialise(IConfigSource source)
 {
     m_config = source.Configs["CombatModule"];
     if (m_config != null)
     {
         m_enabled = m_config.GetBoolean("Enabled", true);
         MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
         ForceRequireCombatPermission = m_config.GetBoolean("ForceRequireCombatPermission", ForceRequireCombatPermission);
         DisallowTeleportingForCombatants = m_config.GetBoolean("DisallowTeleportingForCombatants", DisallowTeleportingForCombatants);
         AllowTeamKilling = m_config.GetBoolean ("AllowTeamKilling", true);
         AllowTeams = m_config.GetBoolean ("AllowTeams", false);
         SendTeamKillerInfo = m_config.GetBoolean ("SendTeamKillerInfo", false);
         TeamHitsBeforeSend = m_config.GetFloat ("TeamHitsBeforeSend", 3);
         DamageToTeamKillers = m_config.GetFloat ("DamageToTeamKillers", 100);
         MaximumHealth = m_config.GetFloat ("MaximumHealth", 100);
         MaximumDamageToInflict = m_config.GetFloat ("MaximumDamageToInflict", 100);
         m_RespawnPosition.X = m_config.GetFloat ("RespawnPositionX", 128);
         m_RespawnPosition.Y = m_config.GetFloat ("RespawnPositionY", 128);
         m_RespawnPosition.Z = m_config.GetFloat ("RespawnPositionZ", 128);
         m_SecondsBeforeRespawn = m_config.GetInt ("SecondsBeforeRespawn", 5);
         m_shouldRespawn = m_config.GetBoolean ("ShouldRespawn", false);
         m_regenHealth = m_config.GetBoolean ("RegenerateHealth", true);
         RegenerateHealthSpeed = m_config.GetFloat ("RegenerateHealthSpeed", 0.0625f);
     }
 }
开发者ID:HGExchange,项目名称:Aurora-Sim,代码行数:25,代码来源:CombatModule.cs

示例2: Initialise

 public void Initialise(IConfigSource source)
 {
     m_config = source.Configs["CombatModule"];
     m_enabled = m_config.GetBoolean("Enabled", true);
     MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
     ForceRequireCombatPermission = m_config.GetBoolean("ForceRequireCombatPermission", ForceRequireCombatPermission);
     DisallowTeleportingForCombatants = m_config.GetBoolean("DisallowTeleportingForCombatants", DisallowTeleportingForCombatants);
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:8,代码来源:CombatModule.cs

示例3: WindConfig

 public void WindConfig(IScene scene, IConfig windConfig)
 {
     if (windConfig != null)
     {
         if (windConfig.Contains("strength"))
         {
             m_strength = windConfig.GetFloat("strength", 1.0F);
         }
     }
 }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:10,代码来源:SimpleRandomWind.cs

示例4: WindConfig

        public void WindConfig (IScene scene, IConfig windConfig)
        {
            if (windConfig != null)
            {
                // Uses strength value if avg_strength not specified
                m_avgStrength = windConfig.GetFloat ("strength", 5.0F);
                m_avgStrength = windConfig.GetFloat ("avg_strength", 5.0F);

                m_avgDirection = windConfig.GetFloat ("avg_direction", 0.0F);
                m_varStrength = windConfig.GetFloat ("var_strength", 5.0F);
                m_varDirection = windConfig.GetFloat ("var_direction", 30.0F);
                m_rateChange = windConfig.GetFloat ("rate_change", 1.0F);
            }
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:14,代码来源:ConfigurableWind.cs

示例5: SimpleCurrencyConfig

 public SimpleCurrencyConfig(IConfig economyConfig)
 {
     foreach (PropertyInfo propertyInfo in GetType().GetProperties())
     {
         try
         {
             if (propertyInfo.PropertyType.IsAssignableFrom(typeof (float)))
                 propertyInfo.SetValue(this,
                                       economyConfig.GetFloat(propertyInfo.Name,
                                                              float.Parse(
                                                                  propertyInfo.GetValue(this, new object[0])
                                                                              .ToString())), new object[0]);
             else if (propertyInfo.PropertyType.IsAssignableFrom(typeof (int)))
                 propertyInfo.SetValue(this,
                                       economyConfig.GetInt(propertyInfo.Name,
                                                            int.Parse(
                                                                propertyInfo.GetValue(this, new object[0])
                                                                            .ToString())), new object[0]);
             else if (propertyInfo.PropertyType.IsAssignableFrom(typeof (bool)))
                 propertyInfo.SetValue(this,
                                       economyConfig.GetBoolean(propertyInfo.Name,
                                                                bool.Parse(
                                                                    propertyInfo.GetValue(this, new object[0])
                                                                                .ToString())), new object[0]);
             else if (propertyInfo.PropertyType.IsAssignableFrom(typeof (string)))
                 propertyInfo.SetValue(this,
                                       economyConfig.GetString(propertyInfo.Name,
                                                               propertyInfo.GetValue(this, new object[0])
                                                                           .ToString()), new object[0]);
             else if (propertyInfo.PropertyType.IsAssignableFrom(typeof (UUID)))
                 propertyInfo.SetValue(this,
                                       new UUID(economyConfig.GetString(propertyInfo.Name,
                                                                        propertyInfo.GetValue(this, new object[0])
                                                                                    .ToString())), new object[0]);
         }
         catch (Exception)
         {
             MainConsole.Instance.Warn("[SimpleCurrency]: Exception reading economy config: " + propertyInfo.Name);
         }
     }
 }
开发者ID:emperorstarfinder,项目名称:My-Aurora-Sim,代码行数:41,代码来源:Config.cs

示例6: ReadConfiguration

 protected void ReadConfiguration(IConfig config)
 {
     PermissionSet.ReadFunctions(config);
     m_timeBeforeTimeout = config.GetFloat("DefaultTimeout", m_timeBeforeTimeout);
     m_defaultRegionThreatLevel = (ThreatLevel)Enum.Parse(typeof(ThreatLevel), config.GetString("DefaultRegionThreatLevel", m_defaultRegionThreatLevel.ToString()));
 }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:6,代码来源:GridRegistrationService.cs

示例7: Initialization


//.........这里部分代码省略.........
                d.GeomSetCategoryBits(StaticSpace, (uint)(CollisionCategories.Space |
                                                        CollisionCategories.Geom |
                                                        //                                                        CollisionCategories.Land |
                                                        //                                                        CollisionCategories.Water |
                                                        CollisionCategories.Phantom |
                                                        CollisionCategories.VolumeDtc
                                                        ));
                d.GeomSetCollideBits(StaticSpace, 0);

                d.GeomSetCategoryBits(GroundSpace, (uint)(CollisionCategories.Land));
                d.GeomSetCollideBits(GroundSpace, 0);

                contactgroup = d.JointGroupCreate(maxContactsbeforedeath + 1);
                //contactgroup

                d.WorldSetAutoDisableFlag(world, false);
            }


            //  checkThread();


            // Defaults

            int contactsPerCollision = 80;

            physicsconfig = null;

            if (m_config != null)
            {
                physicsconfig = m_config.Configs["ODEPhysicsSettings"];
                if (physicsconfig != null)
                {
                    gravityx = physicsconfig.GetFloat("world_gravityx", gravityx);
                    gravityy = physicsconfig.GetFloat("world_gravityy", gravityy);
                    gravityz = physicsconfig.GetFloat("world_gravityz", gravityz);

                    metersInSpace = physicsconfig.GetFloat("meters_in_small_space", metersInSpace);

                    //                    contactsurfacelayer = physicsconfig.GetFloat("world_contact_surface_layer", contactsurfacelayer);

                    ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", ODE_STEPSIZE);

                    avDensity = physicsconfig.GetFloat("av_density", avDensity);
                    avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", avMovementDivisorWalk);
                    avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", avMovementDivisorRun);

                    contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", contactsPerCollision);

                    geomDefaultDensity = physicsconfig.GetFloat("geometry_default_density", geomDefaultDensity);
                    bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", bodyFramesAutoDisable);

                    physics_logging = physicsconfig.GetBoolean("physics_logging", false);
                    physics_logging_interval = physicsconfig.GetInt("physics_logging_interval", 0);
                    physics_logging_append_existing_logfile = physicsconfig.GetBoolean("physics_logging_append_existing_logfile", false);

                    minimumGroundFlightOffset = physicsconfig.GetFloat("minimum_ground_flight_offset", minimumGroundFlightOffset);
                    maximumMassObject = physicsconfig.GetFloat("maximum_mass_object", maximumMassObject);

                    avDensity *= 3f / 80f;  // scale other engines density option to this
                }
            }

            float heartbeat = 1/m_frameWorkScene.FrameTime;
            maximumAngularVelocity = 0.49f * heartbeat *(float)Math.PI;
            maxAngVelocitySQ = maximumAngularVelocity * maximumAngularVelocity;
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:67,代码来源:ODEScene.cs

示例8: ReadOpenRegionSettings

        private void ReadOpenRegionSettings(IConfig instanceSettings, ref RegionInfo region)
        {
            if (instanceSettings == null)
                return;
            region.OpenRegionSettings.MaxDragDistance = instanceSettings.GetFloat("MaxDragDistance",
                                                                                  region.OpenRegionSettings
                                                                                        .MaxDragDistance);
            region.OpenRegionSettings.DefaultDrawDistance = instanceSettings.GetFloat("DefaultDrawDistance",
                                                                                      region.OpenRegionSettings
                                                                                            .DefaultDrawDistance);

            region.OpenRegionSettings.MaximumPrimScale = instanceSettings.GetFloat("MaximumPrimScale",
                                                                                   region.OpenRegionSettings
                                                                                         .MaximumPrimScale);
            region.OpenRegionSettings.MinimumPrimScale = instanceSettings.GetFloat("MinimumPrimScale",
                                                                                   region.OpenRegionSettings
                                                                                         .MinimumPrimScale);
            region.OpenRegionSettings.MaximumPhysPrimScale = instanceSettings.GetFloat("MaximumPhysPrimScale",
                                                                                       region.OpenRegionSettings
                                                                                             .MaximumPhysPrimScale);

            region.OpenRegionSettings.MaximumHollowSize = instanceSettings.GetFloat("MaximumHollowSize",
                                                                                    region.OpenRegionSettings
                                                                                          .MaximumHollowSize);
            region.OpenRegionSettings.MinimumHoleSize = instanceSettings.GetFloat("MinimumHoleSize",
                                                                                  region.OpenRegionSettings
                                                                                        .MinimumHoleSize);

            region.OpenRegionSettings.MaximumLinkCount = instanceSettings.GetInt("MaximumLinkCount",
                                                                                 region.OpenRegionSettings
                                                                                       .MaximumLinkCount);
            region.OpenRegionSettings.MaximumLinkCountPhys = instanceSettings.GetInt("MaximumLinkCountPhys",
                                                                                     region.OpenRegionSettings
                                                                                           .MaximumLinkCountPhys);

            region.OpenRegionSettings.RenderWater = instanceSettings.GetBoolean("RenderWater",
                                                                                region.OpenRegionSettings.RenderWater);
            region.OpenRegionSettings.MaximumInventoryItemsTransfer =
                instanceSettings.GetInt("MaximumInventoryItemsTransfer",
                                        region.OpenRegionSettings.MaximumInventoryItemsTransfer);
            region.OpenRegionSettings.DisplayMinimap = instanceSettings.GetBoolean("DisplayMinimap",
                                                                                   region.OpenRegionSettings
                                                                                         .DisplayMinimap);
            region.OpenRegionSettings.AllowPhysicalPrims = instanceSettings.GetBoolean("AllowPhysicalPrims",
                                                                                       region.OpenRegionSettings
                                                                                             .AllowPhysicalPrims);
            region.OpenRegionSettings.ForceDrawDistance = instanceSettings.GetBoolean("ForceDrawDistance",
                                                                                      region.OpenRegionSettings
                                                                                            .ForceDrawDistance);

            string offset = instanceSettings.GetString("OffsetOfUTC", region.OpenRegionSettings.OffsetOfUTC.ToString());
            int off;
            if (!int.TryParse(offset, out off))
            {
                if (offset == "SLT" || offset == "PST" || offset == "PDT")
                    off = -8;
                else if (offset == "UTC" || offset == "GMT")
                    off = 0;
            }
            region.OpenRegionSettings.OffsetOfUTC = off;
            region.OpenRegionSettings.OffsetOfUTCDST = instanceSettings.GetBoolean("OffsetOfUTCDST",
                                                                                   region.OpenRegionSettings
                                                                                         .OffsetOfUTCDST);
            region.OpenRegionSettings.EnableTeenMode = instanceSettings.GetBoolean("EnableTeenMode",
                                                                                   region.OpenRegionSettings
                                                                                         .EnableTeenMode);
            region.OpenRegionSettings.ShowTags = instanceSettings.GetInt("ShowTags", region.OpenRegionSettings.ShowTags);
            region.OpenRegionSettings.MaxGroups = instanceSettings.GetInt("MaxGroups",
                                                                          region.OpenRegionSettings.MaxGroups);

            string defaultunderpants = instanceSettings.GetString("DefaultUnderpants",
                                                                  region.OpenRegionSettings.DefaultUnderpants.ToString());
            UUID.TryParse(defaultunderpants, out region.OpenRegionSettings.m_DefaultUnderpants);
            string defaultundershirt = instanceSettings.GetString("DefaultUndershirt",
                                                                  region.OpenRegionSettings.DefaultUndershirt.ToString());
            UUID.TryParse(defaultundershirt, out region.OpenRegionSettings.m_DefaultUndershirt);
        }
开发者ID:emperorstarfinder,项目名称:My-Aurora-Sim,代码行数:77,代码来源:OpenRegionSettingsModule.cs

示例9: ReadConfigAndPopulate

        /// <summary>
        /// Parse Configuration
        /// </summary>
        /// <param name="scene"></param>
        /// <param name="startupConfig"></param>
        /// <param name="config"></param>
        private void ReadConfigAndPopulate(IConfig startupConfig, string config)
        {
            if (config == "Startup" && startupConfig != null)
            {
                //m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule");
            }

            if (config == "Economy" && startupConfig != null)
            {
                // Check if the SampleMoneyModule is enabled.
                m_enabled = (startupConfig.GetString("EconomyModule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule");
                if (m_enabled)
                {
                    m_log.InfoFormat("The SampleMoneyModule is enabled.");
                }
                else
                {
                    m_log.InfoFormat("The SampleMoneyModule is disabled. And the economy module [{0}] is being loaded for currency.",
                                     startupConfig.GetString("EconomyModule"));
                }

                // Load the economy data.
                PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100);
                PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10);
                PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4);
                PricePublicObjectDelete = startupConfig.GetInt("PricePublicObjectDelete", 4);
                PriceParcelClaim = startupConfig.GetInt("PriceParcelClaim", 1);
                PriceParcelClaimFactor = startupConfig.GetFloat("PriceParcelClaimFactor", 1f);
                PriceUpload = startupConfig.GetInt("PriceUpload", 0);
                PriceRentLight = startupConfig.GetInt("PriceRentLight", 5);
                TeleportMinPrice = startupConfig.GetInt("TeleportMinPrice", 2);
                TeleportPriceExponent = startupConfig.GetFloat("TeleportPriceExponent", 2f);
                EnergyEfficiency = startupConfig.GetFloat("EnergyEfficiency", 1);
                PriceObjectRent = startupConfig.GetFloat("PriceObjectRent", 1);
                PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10);
                PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1);
                PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1);
                m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false);
            }
        }
开发者ID:johnfelipe,项目名称:Mod-DTL_NSL-MoneyServer,代码行数:46,代码来源:SampleMoneyModule.cs

示例10: CombatPresence

            public CombatPresence(AuroraCombatModule module, ScenePresence SP, IConfig m_config)
            {
                m_SP = SP;
                m_combatModule = module;

                FireOnDeadEvent = m_config.GetBoolean("FireDeadEvent", false);
                AllowTeamKilling = m_config.GetBoolean("AllowTeamKilling", true);
                AllowTeams = m_config.GetBoolean("AllowTeams", false);
                SendTeamKillerInfo = m_config.GetBoolean("SendTeamKillerInfo", false);
                TeamHitsBeforeSend = m_config.GetFloat("TeamHitsBeforeSend", 3);
                DamageToTeamKillers = m_config.GetFloat("DamageToTeamKillers", 100);
                MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);
                m_RespawnPosition.X = m_config.GetFloat("RespawnPositionX", 128);
                m_RespawnPosition.Y = m_config.GetFloat("RespawnPositionY", 128);
                m_RespawnPosition.Z = m_config.GetFloat("RespawnPositionZ", 128);
                m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5);
                m_shouldRespawn = m_config.GetBoolean("ShouldRespawn", false);

                HasLeftCombat = false;
                m_Team = "No Team";

                SP.OnAddPhysics += new ScenePresence.AddPhysics(SP_OnAddPhysics);
                SP.OnRemovePhysics += new ScenePresence.RemovePhysics(SP_OnRemovePhysics);
            }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:25,代码来源:CombatModule.cs

示例11: CombatObject

            public CombatObject(AuroraCombatModule module, SceneObjectPart part, IConfig m_config)
            {
                m_part = part;
                m_combatModule = module;
                
                MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);


                m_Team = "No Team";

                m_part.OnAddPhysics += AddPhysics;
                m_part.OnRemovePhysics += RemovePhysics;
            }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:14,代码来源:CombatModule.cs

示例12: Initialise

        public virtual void Initialise(IConfigSource config)
        {
            m_config = config.Configs["AuroraChat"];

            if (null == m_config)
            {
                MainConsole.Instance.Info("[AURORACHAT]: no config found, plugin disabled");
                m_enabled = false;
                return;
            }

            if (!m_config.GetBoolean("enabled", true))
            {
                MainConsole.Instance.Info("[AURORACHAT]: plugin disabled by configuration");
                m_enabled = false;
                return;
            }

            m_whisperdistance = m_config.GetInt("whisper_distance", m_whisperdistance);
            m_saydistance = m_config.GetInt("say_distance", m_saydistance);
            m_shoutdistance = m_config.GetInt("shout_distance", m_shoutdistance);
            m_maxChatDistance = m_config.GetFloat("max_chat_distance", m_maxChatDistance);

            m_useMuteListModule = (config.Configs["Messaging"].GetString("MuteListModule", "AuroraChatModule") ==
                                   "AuroraChatModule");
        }
开发者ID:JAllard,项目名称:Aurora-Sim,代码行数:26,代码来源:AuroraChatModule.cs

示例13: WindConfig

        public void WindConfig(IScene scene, IConfig windConfig)
        {
            if (scene == null)
                return;

            if (windConfig != null)
            {
                m_strength = windConfig.GetFloat ("strength", m_strength);
                m_damping_rate = windConfig.GetFloat ("damping", m_damping_rate);
                if (m_damping_rate > 1.0f)
                    m_damping_rate = 1.0f;

                m_wind_direction = windConfig.GetInt ("direction", m_wind_direction);
                if (m_wind_direction < 0)
                    m_wind_direction = 0;
                if (m_wind_direction > 5)
                    m_wind_direction = 5;

                m_period = windConfig.GetInt ("period", m_period);
                if (m_period < 0)
                    m_period = 0;

                m_energy_variation = windConfig.GetFloat ("variationrate", m_energy_variation);
                if (m_energy_variation <= 0.0f)
                    m_energy_variation = 0.001f;

                m_viscosity = windConfig.GetFloat ("viscosity", m_viscosity);
                if (m_viscosity < 0.0f)
                    m_viscosity = 0.001f;

                // always using full region size (This does assume square regions)
                m_region_size = scene.RegionInfo.RegionSizeX;

            }
        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Optional-Modules,代码行数:35,代码来源:FlexibleWind.cs

示例14: ReadConfigAndPopulate

        /// <summary>
        /// Parse Configuration
        /// </summary>
        /// <param name="scene"></param>
        /// <param name="startupConfig"></param>
        /// <param name="config"></param>
        private void ReadConfigAndPopulate(IConfig startupConfig, string config)
        {
            if (config == "Startup" && startupConfig != null)
            {
                m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule");
            }

            if (config == "Economy" && startupConfig != null)
            {
                PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100);
                PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10);
                PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4);
                PricePublicObjectDelete = startupConfig.GetInt("PricePublicObjectDelete", 4);
                PriceParcelClaim = startupConfig.GetInt("PriceParcelClaim", 1);
                PriceParcelClaimFactor = startupConfig.GetFloat("PriceParcelClaimFactor", 1f);
                PriceUpload = startupConfig.GetInt("PriceUpload", 0);
                PriceRentLight = startupConfig.GetInt("PriceRentLight", 5);
                TeleportMinPrice = startupConfig.GetInt("TeleportMinPrice", 2);
                TeleportPriceExponent = startupConfig.GetFloat("TeleportPriceExponent", 2f);
                EnergyEfficiency = startupConfig.GetFloat("EnergyEfficiency", 1);
                PriceObjectRent = startupConfig.GetFloat("PriceObjectRent", 1);
                PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10);
                PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1);
                PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1);
                m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false);
            }
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:33,代码来源:SampleMoneyModule.cs

示例15: CombatPresence

            public CombatPresence (AuroraCombatModule module, IScenePresence SP, IConfig m_config)
            {
                m_SP = SP;
                m_combatModule = module;

                FireOnDeadEvent = m_config.GetBoolean("FireDeadEvent", false);
                AllowTeamKilling = m_config.GetBoolean("AllowTeamKilling", true);
                AllowTeams = m_config.GetBoolean("AllowTeams", false);
                SendTeamKillerInfo = m_config.GetBoolean("SendTeamKillerInfo", false);
                TeamHitsBeforeSend = m_config.GetFloat("TeamHitsBeforeSend", 3);
                DamageToTeamKillers = m_config.GetFloat("DamageToTeamKillers", 100);
                MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);
                m_RespawnPosition.X = m_config.GetFloat("RespawnPositionX", 128);
                m_RespawnPosition.Y = m_config.GetFloat("RespawnPositionY", 128);
                m_RespawnPosition.Z = m_config.GetFloat("RespawnPositionZ", 128);
                m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5);
                m_shouldRespawn = m_config.GetBoolean("ShouldRespawn", false);

                HasLeftCombat = false;
                m_Team = "No Team";

                SP.OnAddPhysics += SP_OnAddPhysics;
                SP.OnRemovePhysics += SP_OnRemovePhysics;

                //Use this to fix the avatars health
                m_healthtimer.Interval = 1000; // 1 sec
                m_healthtimer.Enabled = true;
                m_healthtimer.Elapsed += new System.Timers.ElapsedEventHandler (fixAvatarHealth_Elapsed);
            }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:30,代码来源:CombatModule.cs


注:本文中的IConfig.GetFloat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。