Esempio n. 1
0
        public Player(string name, Vector2 position, Texture2D texture)
        {
            Texture = texture;
            Name = name;
            Rotation = 0.0f;
            Position = position;
            AccelerationRate = 8.0f;
            RotationRate = 8.0f;
            Scale = 0.5f;

            MaxHealthPoints = 1000;
            HealthPoints = MaxHealthPoints;

            Money = 0;

            ContentManager cm = GameServices.GetService<ContentManager>();
            Bullet weaponBullet = new Bullet(-30f, 700f, new DisableEffect(2000f), cm.Load<Texture2D>("Textures/bullet"));
            Weapon = new Weapon(weaponBullet, 100f, this);

            HealthBar = new HealthBar(this);
            PlayerControls = ControlsController.GetControls(this);
        }
Esempio n. 2
0
 protected KillableGameObject()
 {
     HealthBar = new HealthBar(this);
 }