Esempio n. 1
0
        public Player(Texture2D spriteSheet)
            : base(spriteSheet)
        {
            DefaultHealth       = 200;
            MaxSelfSpeed        = 2.0f;
            JumpSpeed           = 5f;
            JetPackThrust       = 0.1f;
            MaxClimbingDistance = 5;
            _AimingAngle        = 0f;
            AimingSpeed         = (float)Math.PI / 64f;
            _AimingMaxAngle     = (float)Math.PI / 2f;
            _AimingMinAngle     = -_AimingMaxAngle;
            Weapons             = new List <Weapon>();
            IsFiring            = false;

            CollisionBox = new Rectangle(12, 25, 11, 24);

            AnimationFrames = Sprites.GetSprites(21, 1, spriteSheet);
            Origin          = new Vector2(SourceRect.Width / 2, SourceRect.Height / 2);

            animationPeriod = 3;
        }