Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1.                             if (ghost.hitbox.Intersects(tiles[i, j].hitbox))
  2.                             {
  3.                                
  4.                                 foreach (object e in entities)
  5.                                 {
  6.                                    
  7.                                     if (e is Ghost)
  8.                                     {
  9.                                         Console.WriteLine("hit");
  10.                                         ghost.pos.Y = ghost.prevPos.Y;
  11.                                         ghost.pos.X = ghost.prevPos.X;
  12.                                         ghost.SetDir(rnd.Next(1,4));
  13.  
  14.                                     }
  15.  
  16.                                 }
  17.  
  18.  
  19.                             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement