public Bullet(Map map, Vector2 loc, Game1.Directions dir, Game1.Aspects asp) { currentMap = map; location = loc; moveDir = dir; aspect = asp; inert = false; texture = new Rectangle(0, (int)asp * 6, 6, 6); }
public Enemy(EnemyDef ident, Vector2 loc, Map map, GameScreen screen, Game1.Aspects aspect = Game1.Aspects.None) { this.identity = ident; this.location = loc; this.currentMap = map; this.currentScreen = screen; this.faceDir = Game1.Directions.Down; this.currentFrame = 0; this.stallCount = 0; if (aspect == Game1.Aspects.None) this.aspect = (Game1.Aspects)r.Next(0, 3); else this.aspect = aspect; }
private void Move(Vector2 move_vec) { Vector2 dest = location + move_vec; if (currentMap.squareSolid(dest)) { if (!this.identity.light) PlaySound.Thud(); } else { if (currentScreen.enemyOverlap(dest, this)) return; location = dest; Game1.Aspects test = currentMap.isAspect(location); if ((test != Game1.Aspects.None) && (test != this.aspect)) { this.aspect = test; PlaySound.Aspect(); } } }