本文整理汇总了C#中IActor.Die方法的典型用法代码示例。如果您正苦于以下问题:C# IActor.Die方法的具体用法?C# IActor.Die怎么用?C# IActor.Die使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IActor
的用法示例。
在下文中一共展示了IActor.Die方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MoveToNeighbor
//the actor dies if he tries to enter and there is no bridge if there is a bridge then he can ennter the location without diengh
public override bool MoveToNeighbor(IActor actor, Directions direction)
{
if (!_Bridge.IsActive)
{
actor.Die();
return false;
}
return Location.MoveToNeighbor(actor, direction);
}
示例2: EnterLocation
//the method calls die method when a player enter this location returns falls as the move has no effect
public override bool EnterLocation(IActor actor)
{
actor.Die();
Console.WriteLine("You entered Booby Trap and you Died.");
return false;
}
示例3: KillActor
/// <summary>
/// If the player has a weapon and he is in the same location as an actor, he can kill the actor.
/// </summary>
/// <param name="actor"></param>
public override void KillActor(IActor actor)
{
if(HasItem(new Weapon().Name) && CurrentLocation == actor.CurrentLocation)
actor.Die();
}
示例4: Kill
/// <summary>
/// kills an actor received as a param
/// </summary>
/// <param name="actor"></param>
public void Kill(IActor actor)
{
actor.Die();
}
示例5: KillActor
public override void KillActor(IActor actor)
{
actor.Die();
}
示例6: EnterLocation
//the method calls die method when a player enter this location. Returns false as the move has no effect
public override bool EnterLocation(IActor actor)
{
actor.Die();//call the die method if player enters into it
Console.WriteLine("You entered Booby Trap and you Died.");
return false;
}