コード例 #1
0
 private void On(BackgroundPlaceEvent e)
 {
     this._lock.EnterReadLock();
     try
     {
         if (!this.InternalBackground.Remove(e.Old.Block, new Point(e.X, e.Y)))
         {
             return;                                                                    // Unknown block!
         }
         this.InternalBackground.Add(e.New.Block, new Point(e.X, e.Y));
     }
     finally
     {
         this._lock.ExitReadLock();
     }
 }
コード例 #2
0
ファイル: WorldUtils.cs プロジェクト: notcarksss/BotBits
 internal static bool AreSame(PlaceSendMessage sent, BackgroundPlaceEvent received)
 {
     return(sent.Id == (int)received.New.Block.Id);
 }
コード例 #3
0
 private void OnBackground(BackgroundPlaceEvent e)
 {
     this.Repair <BackgroundPlaceEvent, BackgroundBlock>(Layer.Background, e);
 }