本文整理汇总了C#中BaseCreature.InLOS方法的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature.InLOS方法的具体用法?C# BaseCreature.InLOS怎么用?C# BaseCreature.InLOS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseCreature
的用法示例。
在下文中一共展示了BaseCreature.InLOS方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AOEUnit
public AOEUnit(int itemID, Point3D loc, BaseCreature caster, Map map, TimeSpan duration, int val)
: base(itemID)
{
bool canFit = SpellHelper.AdjustField(ref loc, map, 12, false);
Visible = false;
Movable = false;
Light = LightType.Circle300;
Hue = caster.AOEBreathEffectHue;
Name = caster.AOEBreathName;
MoveToWorld(loc, map);
m_Caster = caster;
m_End = DateTime.Now + duration;
m_Timer = new InternalTimer(this, TimeSpan.FromSeconds(Math.Abs(val) * 0.2), caster.InLOS(this), canFit);
m_Timer.Start();
}
示例2: VisionCheck
// A check to see if the seen mobile meets all the conditions for identifying criminal activity.
public static bool VisionCheck(Mobile m, BaseCreature s, int range)
{
if ((m.Combatant != s) && s.CanSee(m) && s.InLOS(m) && (m.AccessLevel < AccessLevel.Counselor))
{
if (m.Hidden)
return (s.InFieldOfVision(m) && m.InRange(s, range));
else
return m.InRange(s, range);
}
else
return false;
}
示例3: DoBomber
public static void DoBomber(BaseCreature mobile, Mobile player)
{
Mobile combatant = player;
if ( combatant == null || combatant.Deleted || combatant.Map != mobile.Map || !mobile.InRange( combatant, 12 ) || !mobile.CanBeHarmful( combatant ) || !mobile.InLOS( combatant ) )
return;
if ( DateTime.Now >= m_NextBomb )
{
ThrowBomb( combatant, player );
m_Thrown++;
if ( 0.75 >= Utility.RandomDouble() && (m_Thrown % 2) == 1 )
m_NextBomb = DateTime.Now + TimeSpan.FromSeconds( 3.0 );
else
m_NextBomb = DateTime.Now + TimeSpan.FromSeconds( 5.0 + (10.0 * Utility.RandomDouble()) );
}
}