public DeathScreenRoad(MainGame tempGame) : base()
    {
        _game           = tempGame;
        _mainMenuButton = new ImageButton("Road Racer Buttons/Menu.png", 2, 1)
        {
            scale = 0.6f
        };

        _mainMenuButton.SetXY(game.width / 2, game.height / 2 - 50);
        AddChild(_mainMenuButton);

        _quitButton = new ImageButton("Road Racer Buttons/Exit.png", 2, 1)
        {
            scale = 0.6f
        };

        _quitButton.SetXY(game.width / 2, game.height / 2 + 50);
        AddChild(_quitButton);

        _deathText = new DeathText(game.width / 2, game.height / 2 - 150, _game.ticketsReceived);
        AddChild(_deathText);

        Sound backgroundMusic = new Sound("ArkanoidSounds/EndLmao.mp3", true, true);

        _backgroundMusicChannel        = backgroundMusic.Play();
        _backgroundMusicChannel.Volume = 0.2f;
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        isRunning  = true;
        isFinished = false;
        _death     = 0;
        startTime  = Time.time;

        deathText = GameObject.Find("DeathText").GetComponent <DeathText>();
    }
Example #3
0
 void Start()
 {
     healthReserve  = GetComponent <HealthReserve>();
     damageCooldown = GetComponent <DamageCooldown>();
     deathText      = GetComponent <DeathText>();
 }
Example #4
0
 public void SetDeathText(DeathText text)
 {
     deathText = text;
 }