示例#1
0
    public void onPlayerDie()
    {
        SHARED s = SHARED.GetInstance();

        if (s.data.score > s.data.hiscore)
        {
            s.data.hiscore = s.data.score;
            bHiScore       = true;
        }

        s.data.coins += recentCoins;

        DisplayEndPanel();
        DisplayEndButtons();
        HideTopPanel();

        if (bHiScore || recentCoins > 0)
        {
            s.save();
        }

        if (Lib.debug_invincible)
        {
            return;
        }

        //screen_game.GetInstance().onGameOver();
        Lib.DestroyObject(Ball.GetInstance().gameObject);
        setState_gameOver();

        updateDisplay();

        //SimpleAdScript.GetInstance().showInterstitialAd();
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        MonoObj.Create();
        SHARED s = SHARED.GetInstance();

        hiscore.text = "Hiscore : " + Lib.ConvNumtoStrThousandSep(s.data.hiscore);
        //score.text = "Score : " + Lib.ConvNumtoStrThousandSep(s.data.score);
        showHelp(false);
    }
示例#3
0
    private void DisplayEndPanel()
    {
        SHARED s = SHARED.GetInstance();

        newScore.text   = Lib.ConvNumtoStrThousandSep(s.data.score);
        bestScore.text  = Lib.ConvNumtoStrThousandSep(s.data.hiscore);
        totalCoins.text = Lib.ConvNumtoStrThousandSep(s.data.coins);

        ShowPanel(endPanel);
    }
示例#4
0
    public void increaseScore(int deltaScore)
    {
        if (isGameOver())
        {
            return;
        }
        SHARED s = SHARED.GetInstance();

        s.data.score += deltaScore;
        updateDisplay();
    }
示例#5
0
    // Use this for initialization
    void Start()
    {
        MonoObj.Create();

        Lib.ScaleToScreen(rootsprite);

        SHARED s = SHARED.GetInstance();

        s.data.score = 0;
        recentCoins  = 0;

        bIntroIsVisible = true;
        updateDisplay();
        StartCoroutine(co_updateDisplay());
    }
示例#6
0
    // Use this for initialization
    void Start()
    {
        MonoObj.Create();

        Lib.ScaleToScreen(rootsprite);

        SHARED s = SHARED.GetInstance();

        s.data.score = 0;

        bIntroIsVisible = true;
        updateDisplay();
        StartCoroutine(co_updateDisplay());
        //StartCoroutine(co_generateBaddies());
        //Ship.StartGeneratingShips();
    }
示例#7
0
    void updateDisplay()
    {
        SHARED s = SHARED.GetInstance();

        hiscore.text = "Hiscore : " + Lib.ConvNumtoStrThousandSep(s.data.hiscore);
        score.text   = "Score : " + Lib.ConvNumtoStrThousandSep(s.data.score);

        bool b = Lib.fpart(Time.timeSinceLevelLoad) >= .4f;

        if (isGameOver())
        {
            score.gameObject.SetActive(bHiScore ? b : true);
        }
        pausebtn.gameObject.SetActive(isPlaying() && !bIntroIsVisible);
        closebtn.gameObject.SetActive(isPaused());
        gameover.gameObject.SetActive(isGameOver());
        paused.gameObject.SetActive(b && isPaused());
        go.gameObject.SetActive(b && isPlaying() && bIntroIsVisible);
    }
示例#8
0
    public void onPlayerDie()
    {
        SHARED s = SHARED.GetInstance();

        if (s.data.score > s.data.hiscore)
        {
            s.data.hiscore = s.data.score;
            s.save();
            bHiScore = true;
        }

        if (Lib.debug_invincible)
        {
            return;
        }

        //screen_game.GetInstance().onGameOver();
        Lib.DestroyObject(Ball.GetInstance().gameObject);
        setState_gameOver();

        updateDisplay();

        SimpleAdScript.GetInstance().showInterstitialAd();
    }