Пример #1
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            SceneManager.LoadScene("player_test");
        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            funcDoNow = new DoNowDelegate(SpawnBlock);
            isRunning = true;
        }

        funcDoNow();
    }
Пример #2
0
    void Start()
    {
        timer         = 0;
        score         = 0;
        txtScore.text = 0.ToString();

        thisInstance = this;

        audio = GetComponent <AudioSource>();

        funcDoNow = new DoNowDelegate(DoNothing);

        prefabs = new PrefabsHolder("Prefabs");

        prefabs.InstantiateMain();
    }