init
This commit is contained in:
commit
9afd57306d
323 changed files with 204673 additions and 0 deletions
32
Assets/Scripts/Game01.cs
Normal file
32
Assets/Scripts/Game01.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Game01 : MonoBehaviour{
|
||||
|
||||
public GameObject unpressed;
|
||||
public GameObject pressed;
|
||||
public GameObject particles;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start(){
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
if (Input.GetKeyDown(KeyCode.Space)){
|
||||
AudioManager.instance.Play("Explosion");
|
||||
unpressed.SetActive(false);
|
||||
pressed.SetActive(true);
|
||||
particles.SetActive(true);
|
||||
StartCoroutine(ChangeScene());
|
||||
Time.timeScale = 0;
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator ChangeScene(){
|
||||
yield return new WaitForSecondsRealtime(1.5f);
|
||||
FindObjectOfType<GameController>().CompleteLevel();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue