本文整理汇总了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
});
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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");
}
}
示例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);
}
}
}
}
示例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);
}
示例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;
}
};
}
示例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));
}
}
示例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");
}
}
示例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;
}
}
示例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;
}
}
}
示例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;
}
}
}