Esempio n. 1
0
        private float mass;          //it's here for futher use maybe. In the futher a projectile can hurt and not only kill. It's power will be computet by mass*speed.



        //TODO: BUGS.
        //1. GO THROUGH PIPES.
        public Projectile(Texture2D textureFacingRight, Texture2D textureFacingLeft, RangedWeapon wpnThatShotThis, float mass, float scale,
                          Floor flr, Mario mrio) : base(new List <Texture2D> {
            textureFacingRight
        }, new List <Texture2D> {
            textureFacingLeft
        }, LocationForNewBullet(mrio, wpnThatShotThis, textureFacingRight), scale, true,
                                                        0, 0, MAX_SPEED_FOR_BULLET, flr, new AlwaysStayStrategy())
        {
            this.wpnThatShotThis = wpnThatShotThis;
            this.mass            = mass;
            this.mrio            = mrio;
            speedX         = mrio.IsFacingRight() ? wpnThatShotThis.ShootingPower : -wpnThatShotThis.ShootingPower;
            currentTexture = mrio.IsFacingRight() ? textureFacingRight : textureFacingLeft;
            isFlipped      = !mrio.IsFacingRight();
        }
Esempio n. 2
0
 public PistolBullet(Texture2D textureFacingRight, Texture2D textureFacingLeft, RangedWeapon wpnThatShotThis, Floor flr, Mario mrio) :
     base(textureFacingRight, textureFacingLeft, wpnThatShotThis, MASS, 1, flr, mrio)
 {
 }