public Goomba(Vector2 location) : base(location) { state = new LeftMovingGoombaState(this); sprite = SpriteMachine.Instance.CreateSprite(SpriteMachine.SpriteTag.Goomba); Physics = new Physics(location); Physics.yAcceleration = Config.GetGravity(); }
public Goomba(Vector2 location,int isMovingRight,Level level) { this.location = location; this.level = level; this.isMovingRight = 1; iGoomba = GoombaFactory.CreateWalkingGoomba(level); }
public Goomba(IWorld world, Point location, IListener <IGameObject> listener) : base( world, location, listener, new Point(32, 32), 32) { SoundEventArgs = new SoundArgs(); state = new GoombaStates.Normal(this); UpdateSprite(); }
public void Update() { if (state is GoombaSmashedState && deathTimer == IEnemyObjectConstants.STOMPEDGOOMBADELAYTIME) { location.Y += IEnemyObjectConstants.VANISH; deathTimer = 0; state = new GoombaWalkingLeftState(this); } else if (state is GoombaSmashedState) { deathTimer++; } if (!isHit) { location = physics.Update(location); } sprite.Update(); }
public void TakeDamage() { iGoomba = GoombaFactory.CreateDeadGoomba(level); isDead = true; isLethal = false; goombaX = 0; goombaY = 0; level.game.sounds.Kick(); }
public Goomba(Game1 game) { myGame = game; physics = new MarioGamePhysics(); state = new GoombaWalkingLeftState(this); }