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


C# Ped.HasBeenDamagedBy方法代码示例

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


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

示例1: isCharDamagedByExplosions

 //最後に受けたダメージが爆風(+素手)によるものなのか調べる関数
 private bool isCharDamagedByExplosions(Ped ped)
 {
     if (ped.HasBeenDamagedBy(Weapon.Unarmed) || ped.HasBeenDamagedBy(Weapon.Heavy_RocketLauncher) || ped.HasBeenDamagedBy(Weapon.Misc_Rocket) || ped.HasBeenDamagedBy(Weapon.Misc_Explosion) || ped.HasBeenDamagedBy(Weapon.Thrown_Grenade))
     {
         return true;
     }
     else
     {
         return false;
     }
 }
开发者ID:TORISOUP,项目名称:GTA4-Inferno-scripts,代码行数:12,代码来源:SuperRPG.cs

示例2: GetCOD

        private string GetCOD(Ped ped)
        {
            string S = "OTHER";

            if (ped.HasBeenDamagedBy(Weapon.Melee_PoolCue)) { S = "POOL CUE"; }
            if (ped.HasBeenDamagedBy(Weapon.Misc_AnyMelee)) { S = "ANY MELEE"; }
            if (ped.HasBeenDamagedBy(Weapon.Misc_RammedByCar)) { S = "TRAFFIC ACCIDENT"; }
            if (ped.HasBeenDamagedBy(Weapon.Misc_Fall)) { S = "FALL"; }
            if (ped.HasBeenDamagedBy(Weapon.Misc_AnyWeapon)) { S = "ANY WEAPON"; }
            if (ped.HasBeenDamagedBy(Weapon.Misc_RunOverByCar)) { S = "TRAFFIC ACCIDENT"; }
            if (ped.HasBeenDamagedBy(Weapon.Handgun_DesertEagle)) { S = "D.E."; }
            if (ped.HasBeenDamagedBy(Weapon.Handgun_Glock)) { S = "GLOCK"; }
            if (ped.HasBeenDamagedBy(Weapon.Heavy_FlameThrower)) { S = "FLAME THROWER"; }
            if (ped.HasBeenDamagedBy(Weapon.Heavy_Minigun)) { S = "MINIGUN"; }
            if (ped.HasBeenDamagedBy(Weapon.Heavy_RocketLauncher)) { S = "RPG-7"; }
            if (ped.HasBeenDamagedBy(Weapon.Misc_Rocket)) { S = "RPG-7"; }
            if (ped.HasBeenDamagedBy(Weapon.Melee_BaseballBat)) { S = "BASEBALLBAT"; }
            if (ped.HasBeenDamagedBy(Weapon.Melee_Knife)) { S = "KNIFE"; }
            if (ped.HasBeenDamagedBy(Weapon.Rifle_AK47)) { S = "AK47"; }
            if (ped.HasBeenDamagedBy(Weapon.Rifle_M4)) { S = "M4"; }
            if (ped.HasBeenDamagedBy(Weapon.Shotgun_Baretta)) { S = "SHOTGUN BARETTA"; }
            if (ped.HasBeenDamagedBy(Weapon.Shotgun_Basic)) { S = "SHOTGUN BASIC"; }
            if (ped.HasBeenDamagedBy(Weapon.SMG_MP5)) { S = "MP5"; }
            if (ped.HasBeenDamagedBy(Weapon.SMG_Uzi)) { S = "UZI"; }
            if (ped.HasBeenDamagedBy(Weapon.SniperRifle_Basic)) { S = "PSG-1"; }
            if (ped.HasBeenDamagedBy(Weapon.SniperRifle_M40A1)) { S = "M40A1"; }
            if (ped.HasBeenDamagedBy(Weapon.Thrown_Grenade)) { S = "GRENADE"; }
            if (ped.HasBeenDamagedBy(Weapon.Thrown_Molotov)) { S = "MOLOTOV"; }
            if (ped.HasBeenDamagedBy(Weapon.Unarmed)) { S = "UNARMED"; }
            if (ped.HasBeenDamagedBy(Weapon.Misc_Explosion)) { S = "EXPLOSION"; }
            if (ped.HasBeenDamagedBy(Weapon.Episodic_18)) { S = "ADVANCED RPG-7"; }
            if (ped.HasBeenDamagedBy(Weapon.Episodic_19)) { S = "ADVANCED RPG-7"; }

            if (ped.HasBeenDamagedBy(ped)) { S = S + "/SUICIDE"; }
            return S;
        }
开发者ID:TORISOUP,项目名称:GTA4-Inferno-scripts,代码行数:36,代码来源:HumanCounter.cs

示例3: AddPed

        public void AddPed(Ped p)
        {
            Timers[index] = 120;
            str[index] = ((Share.eModel)p.Model.Hash).ToString() + "( " + GetCOD(p) + " )";
            KilledByPlayer[index] = p.HasBeenDamagedBy(player.Character);
            if (KilledByPlayer[index])
            {

                Share.AddPoint(1);
            }
            IsMissionChar[index] = p.isRequiredForMission;
            index = (index + 1) % max;
            return;
        }
开发者ID:TORISOUP,项目名称:GTA4-Inferno-scripts,代码行数:14,代码来源:HumanCounter.cs


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