public override bool OtherCollided(Core.Sprite.Sprite sprite, Core.Sprite.SpriteProperties.Directions collidedDirection, PointF CameraLocation) { if (collidedDirection == SpriteProperties.Directions.Down) { if (sprite.Properties.VelocityRect.Y < 0) { sprite.Properties.VelocityRect.Y = -sprite.Properties.VelocityRect.Y; } rotate = true; } return(false); }
public override bool OtherCollided(Core.Sprite.Sprite sprite, Core.Sprite.SpriteProperties.Directions collidedDirection, PointF CameraLocation) { if (sprite.Properties.isPlayer) { if (!((SampleGame.Players.Mario)sprite).haveGun) { ((SampleGame.Players.Mario)sprite).haveGun = true; this.owner = (Core.Material)sprite; this.Properties.isCollisionable = false; } } return(true); }
public override void WeCollided(Core.Sprite.Sprite sprite, SpriteProperties.Directions collidedDirection, PointF CameraLocation) { if (sprite.GetType() == typeof(Bullets.Fire)) { return; } if (sprite.GetType() == typeof(Bullets.Bullet) || sprite.GetType() == typeof(Bullets.ShipFire)) { isdead = true; return; } if (collidedDirection == SpriteProperties.Directions.Up) { jumping = false; JumpLength = RectangleF.Empty; if (this.Properties.VelocityRect.X == 0) { if (!crouch) { this.setAnimation(0); } else { this.setAnimation(2); } } else { if (sprite.Properties.VelocityRect.X == this.Properties.VelocityRect.X) { this.setAnimation(0); } else { if (run) { this.setAnimation(4); } else { this.setAnimation(1); } } } } if (collidedDirection == SpriteProperties.Directions.Down) { jumping = false; } }
public override void WeCollided(Core.Sprite.Sprite sprite, Core.Sprite.SpriteProperties.Directions collidedDirection, System.Drawing.PointF CameraLocation) { base.WeCollided(sprite, collidedDirection, CameraLocation); }