Exemple #1
0
        public Bullet(Player p)
            : base(Util.Texture)
        {
            Width = 16;
            Height = 16;

            Speed = 500;

            TimeToLive = 0.8f;

            Color = Color.Aqua;

            IsActive = true;

            Damage = 1;

            Player = p;
        }
Exemple #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            Util.Initialize(this);

            titleTexture = Content.Load<Texture2D>("title");

            player = new Player(Content.Load<Texture2D>("Octocat"));

            NewLevel(width, height, 3);

            base.Initialize();
        }