Beispiel #1
0
    public void ResetForNewGame()
    {
        distanceCoff = 0;

        noteCamera.transform.localPosition = Vector3.zero;
        startObj.GetComponent <NoteStart>().ResetForNewGame();
        for (int i = 0; i < listNoteActive.Count; i++)
        {
            PushToPool(listNoteActive[i]);
        }

        for (int b = 0; b < listBonusTiles.Count; b++)
        {
            Destroy(listBonusTiles[b].gameObject);
        }
        gameStarted = false;
        listBonusTiles.Clear();
        listNoteActive.Clear();
        dicTouchCover.Clear();
        if (noteTouchEffect == null)
        {
            noteTouchEffect = new NoteTouchEffectManagement(noteCamera, touchEffect.GetComponent <NoteTouchEffect>());
        }
        noteTouchEffect.OnGameReset();
    }
Beispiel #2
0
 void Start()
 {
     screenRatioCurrent = Screen.width * 1.0f / Screen.height;
     scale = screenRatioDefault / screenRatioCurrent;
     //scale = Math.Rou
     //Debug.Log("Current scale: " + scale);
     noteTouchEffect = new NoteTouchEffectManagement(noteCamera, touchEffect.GetComponent <NoteTouchEffect>());
 }