Exemple #1
0
        public void Start()
        {
            Scene.endGame = false;

            // Background
            SBG = new ScrollingBackground(AM.GetTexture("Background.png"), 100.0);

            // Player
            ShipSpecs specs = new ShipSpecs();

            specs.Level      = 1;
            specs.Velocity   = 400.0;
            specs.HP         = 5;
            specs.MaxHP      = 50;
            specs.Damage     = 25;
            specs.MaxDamage  = 100;
            specs.LazerCount = 1;
            specs.Cooldown   = 0.3;
            player           = new Ship(Scene, new DrawComponent(AM.GetTexture("Ship.png"), new Size(64.0, 64.0)), new TransformComponent(new Point(200.0, 700.0)), specs);
            Scene.NewActors.Add(player);
            PM.CreateBoxComponent(new Size(64.0, 64.0), player);

            State = GameState.InProgress;

            Window.ScoreBar.Maximum = MaxScore;
        }