protected override void AfterCollision(Map map, Vector2Object hit) { Explosion.Explode(hit.Vector2, _damage); if (_wet == false) { _trail.LeftParticle(); } }
protected void Pressure(Inpc inpc) { if (_resolver.VerticalPressure == true || _resolver.HorizontalPressure == true) { Game1.mapLive.MapNpcs.Remove(inpc); Explosion.Explode(Boundary.Origin, 32); } }
public void Update(List <Inpc> npcs) { _time.Update(); _bubbleTime.Update(); if (_resolver.InWater == true) { if (_bubbleTime.Ready == true) { _bubbleTime.Reset(); } } _resolver.move(ref _velocity, new Vector2(2f), Boundary, 0f, new Vector2(0.05f), new Vector2(0.005f), new Vector2(0.3f), Game1.mapLive.MapMovables); if (_resolver.VerticalPressure == true || _resolver.HorizontalPressure == true) { Explosion.Explode(Boundary.Origin, 128); Game1.mapLive.MapNpcs.Remove(this); } if (_resolver.TouchTop || _resolver.InWater || _resolver.TouchBottomMovable) { WalkingVisible = true; _rotLeg += Game1.Delta / 25 * Velocity.X; if (Math.Abs(Velocity.X - _resolver.VelocityReceived.X) < 0.05f) { WalkingVisible = false; } } else { WalkingVisible = false; } if (WalkingVisible == true) { if (Velocity.X < 0) { _walkSin -= Game1.Delta / 16 * Velocity.X; } if (Velocity.X > 0) { _walkSin += Game1.Delta / 16 * Velocity.X; } } }
public void Update(List <Inpc> npcs) { _time.Update(); _bubbleTime.Update(); if (_resolver.InWater == true) { if (_bubbleTime.Ready == true) { _bubbleTime.Reset(); } } _resolver.move(ref _velocity, new Vector2(2f), Boundary, 0f, new Vector2(0.05f), new Vector2(0.005f), new Vector2(0.3f), Game1.mapLive.MapMovables); if (_resolver.VerticalPressure == true || _resolver.HorizontalPressure == true) { Explosion.Explode(Boundary.Origin, 128); Game1.mapLive.MapNpcs.Remove(this); } }
private void Explode(MapTreeHolder map, List <Inpc> npcs) { Explosion.Explode(Boundary.Origin, _damage); Game1.mapLive.MapProjectiles.Remove(this); }