Пример #1
0
    //bool recordingMode = false;
    void Awake()
    {
#if (UNITY_EDITOR)
        importer = GetComponent <NAudioImporter>();
#else
        importer = GetComponent <MobileImporter>();
#endif

        rhythmAnalyzer              = GetComponent <RhythmAnalyzer>();
        rhythmAnalyzer.Initialized += process;
        importer.Loaded            += songLoaded;
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        analyzer = new RhythmAnalyzer();
        calibrating = true;

        hideButtonSprite = GameObject.Find("HideButtons");
        noticeText = GameObject.Find("Notice").GetComponent<Text>();

        chefSprite = GameObject.Find("PizzaMan!");
        // Start the previous beat 1 before the starting beat of the beat machine
        // so that the Rhythm Object will immediately update because it thinks the
        // beat machine is changing from the previous beat to the current beat
        previousBeat = (int)beatMachine.GetBeatPosition() - 1;
    }