Exemple #1
0
        static void Main(string[] args)
        {
            masterControl nGame = new masterControl();

            nGame.reglas();

            Console.ReadKey();
        }
    void Awake()
    {
        masterControl MC = GetComponent <masterControl>();

        if (MC.currentPlatform == masterControl.platform.Vive)
        {
            Instantiate(hmdPrefab, hmdTargetVive, false);
            manips[0] = (Instantiate(controllerPrefab, controllerLTargetVive, false) as GameObject).GetComponentInChildren <manipulator>();
            manips[1] = (Instantiate(controllerPrefab, controllerRTargetVive, false) as GameObject).GetComponentInChildren <manipulator>();

            manips[0].transform.parent.localPosition = Vector3.zero;
            manips[1].transform.parent.localPosition = Vector3.zero;

            //if (SteamVR.instance.hmd_TrackingSystemName == "oculus") oculusSwitch();
        }
    }
    void Awake()
    {
        instance        = this;
        _measurePhase   = 0;
        _sampleDuration = 1.0 / AudioSettings.outputSampleRate;

        if (!PlayerPrefs.HasKey("glowVal"))
        {
            PlayerPrefs.SetFloat("glowVal", 1);
        }
        if (!PlayerPrefs.HasKey("envSound"))
        {
            PlayerPrefs.SetInt("envSound", 1);
        }

        glowVal = PlayerPrefs.GetFloat("glowVal");
        setGlowLevel(glowVal);

        if (PlayerPrefs.GetInt("envSound") == 0)
        {
            MuteBackgroundSFX(true);
            muteEnvToggle.isOn = true;
        }

        SaveDir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + Path.DirectorySeparatorChar + "SoundStage";
        ReadFileLocConfig();
        Directory.CreateDirectory(SaveDir + Path.DirectorySeparatorChar + "Saves");
        Directory.CreateDirectory(SaveDir + Path.DirectorySeparatorChar + "Samples");

        beatUpdateEvent += beatUpdateEventLocal;
        beatResetEvent  += beatResetEventLocal;

        setBPM(120);

        GetComponent <sampleManager>().Init();
    }