コード例 #1
0
ファイル: TapGame.cs プロジェクト: BaggioPereira/TapThat
 public void GameOver()
 {
     Time.timeScale = 0f;
     GameDisplay.SetActive(false);
     GameOverDisplay.SetActive(true);
     GameOverScore.GetComponent <TextMeshProUGUI>().text = "Score: " + Score;
     Advertisement.Show();
 }
コード例 #2
0
ファイル: HealthController.cs プロジェクト: kolibrek/Merith
    // Use this for initialization
    void Start()
    {
        controller      = GetComponent <Controller2D>();
        render          = GetComponent <Renderer>();
        gameOverDisplay = GameObject.Find("GameOverDisplay").GetComponent <GameOverDisplay>();

        invulnerable = new Color(0.8f, 0.3f, 0.3f, 1f);
        normal       = new Color(1f, 1f, 1f, 1f);

        health = maxHealth;
    }
コード例 #3
0
 void Start()
 {
     this.tui = this.GetComponentInChildren <TimerUI>();
     this.ad  = this.GetComponentInChildren <ActionDisplay>();
     this.lb  = this.GetComponentInChildren <LockButton>();
     this.dbp = this.GetComponentInChildren <DebugPanel>();
     this.gsd = this.GetComponentInChildren <GameStateDisplay>();
     this.asg = this.GetComponentInChildren <ActionSelectGroup>();
     this.god = this.GetComponentInChildren <GameOverDisplay>();
     this.GameOverDisplayHide();         // Hide this till needed. Todo Warning, may depend on script execution order
     this.lasb = new List <ActionSelectButton>();
     this.hsd  = this.GetComponentInChildren <HitSunkDisplay>();
 }
コード例 #4
0
ファイル: GameManager.cs プロジェクト: youncher/ludumdare48
    void Start()
    {
        gameOverDisplay           = gameOverDisplayGO.GetComponent <GameOverDisplay>();
        player                    = playerGO.GetComponent <PlayerController>();
        gloomProjectileController = gloomProjectileControllerGO.GetComponent <GloomProjectileController>();
        targetCounterText         = targetCounterTextGO.GetComponent <TextMeshProUGUI>();

        if (string.Equals(SceneManager.GetActiveScene().name, "Level1Scene"))
        {
            Debug.Log("I'M IN SCENE 1!!!");
        }

        // Display number of kills to win level
        killsNeededToWin = 3;
        targetCounterText.SetText($"{killsNeededToWin}");
    }