コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     myScoreHandler = GameObject.FindGameObjectWithTag("ScoreHandler").GetComponent<scoreHandler>();
     if (gameLost)
     {
         //Time.timeScale = 0.0f;
         youLostMenu.enabled = true;
     }
 }
コード例 #2
0
 void Awake()
 {
     DontDestroyOnLoad(gameObject);
     //highScoreText = GameObject.FindGameObjectWithTag("highScore").GetComponent<Text>();
     //scoreText = GameObject.FindGameObjectWithTag("score").GetComponent<Text>();
     if (scoreH == null)
     {
         //DontDestroyOnLoad(gameObject);
         scoreH = this;
     }
     else if (scoreH != this)
     {
         Destroy(gameObject);
     }
 }
コード例 #3
0
    void Start()
    {
        scoreBoard = GameObject.FindGameObjectWithTag("ScoreHandler").GetComponent<scoreHandler>();
        timer = GameObject.FindGameObjectWithTag("NotUITimer").GetComponent<gameTimer>();

        gridPoints = new BlockPhysics[width, height];
        anchorPoints = new Vector3[width, height];
        InitializeGrid();
        FillAnchorPoints();

        CreateNewBlockRow();
        CreateNewBlockRow();
        CreateNewBlockRow();
    }