public GameObject(float scale = 0)
        {
            if (scale == 0)
            {
                scale = GameController.scale;
            }

            animatedTexture = new AnimatedTexture(Position, 0, scale, 0.5f);
        }
示例#2
0
 public Player(GameController game, int rupees, int arrowCount = 0, int bombCount = 0, int lives = 0) : base(2f)
 {
     _game          = game;
     ArrowCount     = arrowCount;
     BombCount      = bombCount;
     RupeeCount     = rupees;
     LifeCount      = lives;
     throwAni       = new AnimatedTexture(Position, 0, 2, 0.5f);
     Texture        = new _2DTexture(game.Content.Load <Texture2D>("player/linkidle" + (GameController.Difficulty == "Normal" ? "" : "small")), GameController.scale);
     throwIdle      = new _2DTexture(game.Content.Load <Texture2D>("player/linkidlewithboom"), 2);
     Texture._scale = 2;
     Position       = new Vector2((GameController.ScreenWidth / 2) - (Texture.GetWidth() / 2), GameController.ScreenHeight - game.environment.HorWallTile.GetHeight() - (int)(GameController.ScreenHeight * 0.01) - Texture.GetHeight());
     animatedTexture.Load(game.Content, "player/linkwithpaddle" + (GameController.Difficulty == "Normal" ? "" :"small"), Frames, FramesPerSec);
     throwAni.Load(game.Content, "player/linkwithboom", Frames, FramesPerSec);
     shield = new Rectangle((int)Position.X, (int)Position.Y, Texture.GetWidth(), 8);
 }