Exemplo n.º 1
0
        public Player()
        {
            mSprite = new GameSprite();
            mHealth = 100;
            mPosition = Vector2.Zero;
            mVelocity = Vector2.Zero;
            mPlayerColor = Color.White;

            mWeaponSprite = new GameSprite();
            mWeaponAngleR = 0f;
            mIsShootingRight = true;
            mIsShootingRight = true;
        }
Exemplo n.º 2
0
        public Player(Texture2D playerImage, Texture2D weaponImage, Vector2 initialPos, Color color, bool isFacingRight, bool isShootingRight, Texture2D crosshair, Texture2D laser)
        {
            mSprite = new GameSprite(playerImage, initialPos);
            mHealth = 100;
            mPosition = initialPos;
            mVelocity = Vector2.Zero;
            mPlayerColor = color;

            mWeaponSprite = new GameSprite(weaponImage, initialPos);
            mWeaponAngleR = 0f;
            mIsShootingRight = true;
            mIsFacingRight = isFacingRight;
            mIsShootingRight = isShootingRight;
            mCrosshair = new GameSprite(crosshair, Vector2.Zero);
            mLaser = new GameSprite(laser, Vector2.Zero);

            if (!mIsShootingRight)
            {
                mWeaponAngleR = (float)-Math.PI;
            }
        }