本文整理汇总了C#中World.DiscoverTerrainAroundPlayer方法的典型用法代码示例。如果您正苦于以下问题:C# World.DiscoverTerrainAroundPlayer方法的具体用法?C# World.DiscoverTerrainAroundPlayer怎么用?C# World.DiscoverTerrainAroundPlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类World
的用法示例。
在下文中一共展示了World.DiscoverTerrainAroundPlayer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastSpell
public bool CastSpell(ICreature caster, Vector2 targetWorldIndex, AreaOfEffect affectedArea, World world)
{
ITerrain targetTile = world.Tiles[(int)targetWorldIndex.X, (int)targetWorldIndex.Y];
if (targetTile.IsExploredByPlayer && targetTile.CanCreatureEnter(caster) && world.IsWorldIndexFreeOfObstacles(targetWorldIndex))
{
caster.WorldIndex = targetWorldIndex;
world.CenterCameraOnPlayer();
world.DiscoverTerrainAroundPlayer();
}
else
{
Announcer.Instance.Announce(caster.Name + " tried to teleport, but could not.", MessageTypes.SpellFailure);
}
return true;
}
示例2: EffectCompleted
public void EffectCompleted(ICreature creature, World world)
{
if (creature.ViewDistance.Current + _amountToReduceVisionBy >= creature.ViewDistance.Maximum)
{
creature.ViewDistance.Current = creature.ViewDistance.Maximum;
Announcer.Instance.Announce(creature.Name + "'s vision returned to normal!", MessageTypes.Other);
}
else
{
creature.ViewDistance.Current += _amountToReduceVisionBy;
Announcer.Instance.Announce(creature.Name + "'s vision improved.", MessageTypes.Other);
}
world.DiscoverTerrainAroundPlayer();
if (Completed != null)
Completed(this);
}
示例3: ApplyEffect
public void ApplyEffect(ICreature creature, World world)
{
creature.ViewDistance.Current -= _amountToReduceVisionBy;
if (creature.IsPlayer() == true)
world.DiscoverTerrainAroundPlayer();
}