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


C# MissileClient类代码示例

本文整理汇总了C#中MissileClient的典型用法代码示例。如果您正苦于以下问题:C# MissileClient类的具体用法?C# MissileClient怎么用?C# MissileClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: GameObject_OnCreate

        private static void GameObject_OnCreate(GameObject sender, EventArgs args)
        {
            var client = sender as MissileClient;
            if (client != null && client.SData.Name == "AhriOrbMissile")
            {
                QOrbMissile = client;
            }
            if (client != null && client.SData.Name == "AhriOrbReturn")
            {
                QReturnMissile = client;
            }

            if (sender.Name != "Rengar_LeapSound.troy")
                return;

            var gapcloserMenuInfo = Config.AntiGapcloserMenuValues.FirstOrDefault(x => x.Champion == "Rengar");

            if (gapcloserMenuInfo == null || !gapcloserMenuInfo.Enabled)
                return;

            foreach (var rengar in EntityManager.Heroes.Enemies.Where(x => x.IsValidTarget(1000) && x.ChampionName == "Rengar").Where(rengar => rengar.Distance(Player.Instance.Position) < 1000))
            {
                CachedAntiGapclosers.Add(new ProcessSpellCastCache
                {
                    Sender = rengar,
                    NetworkId = rengar.NetworkId,
                    DangerLevel = gapcloserMenuInfo.DangerLevel,
                    Tick = (int)Game.Time * 1000
                });
            }
        }
开发者ID:FireBuddy,项目名称:EloBuddy-Addons,代码行数:31,代码来源:Program.cs

示例2: IsMissileClient

 public static bool IsMissileClient(this GameObject gameObject, out MissileClient missileClient)
 {
     missileClient = null;
     if (gameObject.GetType() != typeof(MissileClient) || !((MissileClient)gameObject).IsValidMissile())
         return false;
     missileClient = (MissileClient) gameObject;
     return true;
 }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:8,代码来源:SpellDetection.cs

示例3: Obj_SpellMissile_OnCreate

 public static void Obj_SpellMissile_OnCreate(GameObject sender, EventArgs args)
 {
     if (!(sender is MissileClient)) return;
     var missile = (MissileClient)sender;
     if (missile.SpellCaster != null && missile.SpellCaster.IsValid && missile.SpellCaster.IsMe &&
         missile.SData.Name.Equals("VelkozQMissile", StringComparison.InvariantCultureIgnoreCase))
     {
         QMissile = missile;
     }
 }
开发者ID:chienhao10,项目名称:Buddy-dev-1,代码行数:10,代码来源:SPELLS.cs

示例4: GameObject_OnCreate

 public static void GameObject_OnCreate(GameObject sender, EventArgs args)
 {
     var piuwpiuw = sender as MissileClient;
     if (piuwpiuw != null && piuwpiuw.IsValid)
     {
         if (piuwpiuw.SpellCaster.IsMe && piuwpiuw.SData.Name == "LissandraEMissile")
         {
             PiuwPiuwMissile = piuwpiuw;
         }
     }
 }
开发者ID:FireBuddy,项目名称:EloBuddy-2,代码行数:11,代码来源:Program.cs

示例5: setParticle

 public static void setParticle(MissileClient part)
 {
     //Should add check if same spell :)
     foreach (var targ in ActiveTargeted)
     {
         if (targ.particle == null && targ.hadPart == false)
         {
             targ.particle = part;
             targ.hadPart = true;
             return;
         }
     }
 }
开发者ID:fgpmaia123,项目名称:LSharpWIP,代码行数:13,代码来源:TargetSpellDetector.cs

示例6: SpellMissile_OnCreateOld

        private void SpellMissile_OnCreateOld(GameObject sender, EventArgs args)
        {
            if (sender.IsEnemy || sender.Type != GameObjectType.MissileClient || !sender.IsValid<MissileClient>())
                return;

            MissileClient missile = (MissileClient)sender;

            if (missile.SData.Name != null)
            {
                if (missile.SData.Name == MissileName || missile.SData.Name == MissileReturnName)
                {
                    Missile = missile;
                }
            }
        }
开发者ID:MrWenzoxfs,项目名称:elobuddy,代码行数:15,代码来源:MissileReturn.cs

示例7: GameObject_OnCreate

        private static void GameObject_OnCreate(GameObject sender, EventArgs args)
        {
            if (sender == null)
                return;

            MissileClient projectile = sender as MissileClient;

            if (projectile == null || projectile.SpellCaster == null || projectile.SData == null || projectile.SpellCaster.Type != GameObjectType.AIHeroClient)
                return;

            if (projectile.SpellCaster.IsMe && projectile.SData.Name == "VelkozQMissile")
            {
                activeQ = projectile;
                //Console.WriteLine("Q Missile Created");
            }
        }
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:16,代码来源:Program.cs

示例8: OnDeleteMissile

 private static void OnDeleteMissile(Skillshot skillshot, MissileClient missile)
 {
     if (skillshot.SpellData.SpellName == "VelkozQ")
     {
         var spellData = Evade.SpellDatabase.GetByName("VelkozQSplit");
         var direction = skillshot.Direction.Perpendicular();
         if (EvadeDetectedSkillshots.Count(s => s.SpellData.SpellName == "VelkozQSplit") == 0)
         {
             for (var i = -1; i <= 1; i = i + 2)
             {
                 var skillshotToAdd = new Skillshot(
                     DetectionType.ProcessSpell, spellData, Environment.TickCount, missile.Position.LSTo2D(),
                     missile.Position.LSTo2D() + i * direction * spellData.Range, skillshot.Caster);
                 EvadeDetectedSkillshots.Add(skillshotToAdd);
             }
         }
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:18,代码来源:EvadeHelper.cs

示例9: ObjMissileClientOnCreateDelayed

 private static void ObjMissileClientOnCreateDelayed(MissileClient missile, SpellData spellData)
 {
     var unit = missile.SpellCaster as Obj_AI_Hero;
     var missilePosition = missile.Position.ToVector2();
     var unitPosition = missile.StartPosition.ToVector2();
     var endPos = missile.EndPosition.ToVector2();
     var direction = (endPos - unitPosition).Normalized();
     if (unitPosition.Distance(endPos) > spellData.Range || spellData.FixedRange)
     {
         endPos = unitPosition + direction * spellData.Range;
     }
     if (spellData.ExtraRange != -1)
     {
         endPos += Math.Min(spellData.ExtraRange, spellData.Range - endPos.Distance(unitPosition)) * direction;
     }
     var castTime = Variables.TickCount - Game.Ping / 2 - (spellData.MissileDelayed ? 0 : spellData.Delay)
                    - (int)(1000f * missilePosition.Distance(unitPosition) / spellData.MissileSpeed);
     TriggerOnDetectSkillshot(DetectionType.RecvPacket, spellData, castTime, unitPosition, endPos, unit);
 }
开发者ID:LordZEDith,项目名称:LeagueSharp-5,代码行数:19,代码来源:SkillshotDetector.cs

示例10: Collision

        /// <summary>
        ///     Initializes static members of the <see cref="Collision" /> class.
        ///     Static Constructor
        /// </summary>
        static Collision()
        {
            GameObject.OnCreate += (sender, args) =>
            {
                var missile = sender as MissileClient;
                var spellCaster = missile?.SpellCaster as AIHeroClient;

                if (spellCaster == null || spellCaster.ChampionName != "Yasuo"
                    || spellCaster.Team == GameObjects.Player.Team)
                {
                    return;
                }

                switch (missile.SData.Name)
                {
                    case "YasuoWMovingWallMisL":
                        yasuoWallLeft = missile;
                        break;
                    case "YasuoWMovingWallMisR":
                        yasuoWallRight = missile;
                        break;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                var missile = sender as MissileClient;

                if (missile == null)
                {
                    return;
                }

                if (missile.Compare(yasuoWallLeft))
                {
                    yasuoWallLeft = null;
                }
                else if (missile.Compare(yasuoWallRight))
                {
                    yasuoWallRight = null;
                }
            };
        }
开发者ID:CONANLXF,项目名称:Berb.Common,代码行数:46,代码来源:Collision.cs

示例11: OnDeleteMissile

 private static void OnDeleteMissile(Skillshot skillshot, MissileClient missile)
 {
     if (skillshot.SpellData.SpellName != "VelkozQ"
         || DetectedSkillshots.Count(i => i.SpellData.SpellName == "VelkozQSplit") != 0)
     {
         return;
     }
     var spellData = SpellDatabase.GetByName("VelkozQSplit");
     for (var i = -1; i <= 1; i = i + 2)
     {
         DetectedSkillshots.Add(
             new Skillshot(
                 DetectionType.ProcessSpell,
                 spellData,
                 Variables.TickCount,
                 missile.Position.ToVector2(),
                 missile.Position.ToVector2() + i * skillshot.Direction.Perpendicular() * spellData.Range,
                 skillshot.Unit));
     }
 }
开发者ID:seniseviy,项目名称:LeagueSharp-6,代码行数:20,代码来源:Evade.cs

示例12: GameObject_OnDelete

        private static void GameObject_OnDelete(GameObject sender, EventArgs args)
        {
            if (sender == null)
                return;

            MissileClient projectile = sender as MissileClient;

            if (projectile == null || projectile.SpellCaster == null || projectile.SData == null || projectile.SpellCaster.Type != GameObjectType.AIHeroClient)
                return;

            if (projectile.SpellCaster.IsMe && projectile.SData.Name == "VelkozQMissile")
            {
                activeQ = null;
                startPos = Vector2.Zero;
                LeftPos = Vector2.Zero;
                RightPos = Vector2.Zero;
                QTarget = null;
                //Console.WriteLine("Q Missile Destroyed");
            }
        }
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:20,代码来源:Program.cs

示例13: GameObject_OnCreate

        private static void GameObject_OnCreate(GameObject sender, EventArgs args)
        {
            var particle = sender as Obj_GeneralParticleEmitter;
            if (particle != null && particle.IsValid &&
                (particle.Name.Contains("Ahri_Orb") || particle.Name.Contains("Ahri_Passive")))
            {
                AhriQParticle = particle;
                return;
            }

            var missile = sender as MissileClient;
            if (missile == null || !missile.IsValid || !missile.SpellCaster.IsMe)
            {
                return;
            }

            if (missile.SData.Name.Equals("AhriOrbReturn") || missile.SData.Name.Equals("AhriOrbMissile"))
            {
                AhriQMissile = missile;
            }
        }
开发者ID:StopMotionCuber,项目名称:LeagueSharp-1,代码行数:21,代码来源:Program.cs

示例14: GameObject_OnDelete

 private static void GameObject_OnDelete(GameObject sender, EventArgs args)
 {
     var missile = sender as MissileClient;
     if (missile != null)
     {
         if (missile.IdEquals(WMissile))
         {
             WMissile = null;
         }
         else if (missile.IdEquals(RMissile))
         {
             RMissile = null;
         }
     }
 }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:15,代码来源:SpellManager.cs

示例15: GameObject_OnCreate

 private static void GameObject_OnCreate(GameObject sender, EventArgs args)
 {
     var missile = sender as MissileClient;
     if (missile != null && missile.SpellCaster != null && missile.SpellCaster.IsMe)
     {
         if (missile.SData.Name.Equals("JinxWMissile"))
         {
             WMissile = missile;
             Core.DelayAction(delegate { WMissile = null; }, (int)(1000 * missile.SpellCaster.Distance(missile.EndPosition) / W.Speed) + 200);
         }
         if (missile.SData.Name.Equals("JinxR"))
         {
             RMissile = missile;
         }
     }
 }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:16,代码来源:SpellManager.cs


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