コード例 #1
0
ファイル: ChatSystem.cs プロジェクト: brewsterl/berserker
 /// <summary>
 /// Handles sending a chat message in a player's local vicinity.
 /// </summary>
 /// <param name="type">The type of chat to send.</param>
 /// <param name="set">The set of things in the player's local vicinity.</param>
 /// <param name="msg">The message to send.</param>
 /// <param name="sender">The sender of the message.</param>
 private void HandleLocalChat(ChatLocal type, ThingSet set, 
     string msg, Creature sender)
 {
     foreach (Thing thing in set.GetThings()) {
         thing.AddLocalChat(type, msg, sender.CurrentPosition, sender);
     }
 }
コード例 #2
0
ファイル: GameWorld.cs プロジェクト: brewsterl/berserker
 private void AddShootEffect(DistanceType type, Position origin,
     Position destination, ThingSet tSet)
 {
     gameMap.GetThingsInVicinity(origin, tSet);
     gameMap.GetThingsInVicinity(destination, tSet);
     foreach (Thing thing in tSet.GetThings()) {
         thing.AddShootEffect((byte)type, origin, destination);
     }
 }