public void Awake() { if (instance == null) { instance = this; } }
void OnCollisionEnter(Collision collision) { //ステージ終わりのオブジェクトに触れたら if (collision.gameObject.tag == "Player") { MoveScene.SceneManagmentResult(); } }
void Start () { this.scoreUpdate = () => { }; isPlaying = false; isGameComplete = false; isGameOver = false; textObj01 = GameObject.Find (objName01); textObj02 = GameObject.Find (objName02); textComponent01 = textObj01.GetComponent<Text> (); textComponent02 = textObj02.GetComponent<Text> (); moveScene = FindObjectOfType<MoveScene> (); startCameraEvent = FindObjectOfType<StartCameraEvent> (); StartCoroutine (CountDown()); }
private void Start() { Invoke("DelayMethod", 3f); life = 3; Time.timeScale = 1f; nextSceneButton.SetActive(false); Goal = GameObject.FindGameObjectWithTag("Goal"); GoalScript = Goal.GetComponent <GoalController>(); textLife = GameObject.Find("Life").GetComponent <Text>(); SetLifeText(life); //今いるシーンをセット MoveScene.SceneSet(); inGame = true; GameObject image_object = GameObject.Find("GameOver"); image_component = image_object.GetComponent <Image>(); image_component.enabled = false; }