Esempio n. 1
0
 public bool IsTouching(Actor actor)
 {
     bool intersect;
     Rectangle otherBounds = new Rectangle((int)actor.Position.X, (int)actor.Position.Y, (int)actor.Size.X, (int)actor.Size.Y);
     new Rectangle((int)Position.X, (int)Position.Y, (int)Size.X, (int)Size.Y).Intersects(ref otherBounds, out intersect);
     return intersect;
 }
Esempio n. 2
0
 public void Update(GameTime gameTime, Actor agent = null)
 {
     OldKeyboardState = CurrentKeyboardState;
     CurrentKeyboardState = Keyboard.GetState();
 }
Esempio n. 3
0
 public void AddActor(Actor actor)
 {
     mActorsToAdd.Add(actor);
 }
Esempio n. 4
0
 public void RemoveActor(Actor actor)
 {
     mActorsToRemove.Add(actor);
 }