Esempio n. 1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        gs = GetComponent<GeneralScript>();
        activeModule = false;
        speedmodok = true;
        rateok = true;
        animok = true;

        matCache = cacheOption.renderer.material;

        fadeAlphaOptionTitle = 1f;
        stateLoading = new bool[9];
        displaySelected = new bool[DataManager.Instance.aDisplay.Length];
        for(int i=0;i<stateLoading.Length-1;i++) stateLoading[i] = false;
        for(int j=0;j<DataManager.Instance.aDisplay.Length;j++) displaySelected[j] = DataManager.Instance.songSelected != null ? DataManager.Instance.displaySelected[j] : false;

        DataManager.Instance.BPMEntryMode = ProfileManager.Instance.currentProfile.inBPMMode;

        rateSelected = DataManager.Instance.songSelected != null ? DataManager.Instance.rateSelected : 0f;
        scoreJudgeSelected = DataManager.Instance.songSelected != null ? DataManager.Instance.scoreJudgeSelected : Judge.NORMAL;
        hitJudgeSelected = DataManager.Instance.songSelected != null ? DataManager.Instance.hitJudgeSelected : Judge.NORMAL;
        lifeJudgeSelected = DataManager.Instance.songSelected != null ? DataManager.Instance.lifeJudgeSelected : Judge.NORMAL;
        skinSelected = DataManager.Instance.songSelected != null ? DataManager.Instance.skinSelected : 0;
        raceSelected = DataManager.Instance.songSelected != null ? DataManager.Instance.raceSelected : 0;
        deathSelected = DataManager.Instance.songSelected != null ? DataManager.Instance.deathSelected :0;

        ratestring = rateSelected.ToString("00");

        alphaText = new float[stateLoading.Length];
        isFading = new bool[stateLoading.Length];
        alphaDisplay = new float[stateLoading.Length];
        isFadingDisplay = new bool[stateLoading.Length];
        offsetFading = new float[stateLoading.Length];
        offsetPreviousFading = new float[stateLoading.Length];
        for(int i=0;i<stateLoading.Length;i++) offsetFading[i] = 0f;
        for(int i=0;i<stateLoading.Length;i++) offsetPreviousFading[i] = 0f;
        for(int i=0;i<stateLoading.Length;i++) isFading[i] = false;
        for(int i=0;i<stateLoading.Length;i++) alphaText[i] = 1f;
        for(int i=0;i<stateLoading.Length;i++) isFadingDisplay[i] = false;
        for(int i=0;i<stateLoading.Length;i++) alphaDisplay[i] = displaySelected[i] ? 1f : 0f;

        if(DataManager.Instance.quickMode){
            timeOption = 0.02f;
        }
    }
Esempio n. 3
0
 // On start, grab the reference to the general object.
 private void Start()
 {
     general = GameObject.Find("General").GetComponent <GeneralScript>();
 }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        gs = GetComponent<GeneralScript>();
        error = GetComponent<ErrorLabel>();
        popin = false;
        popout = false;
        activeModule = true;
        posBaseCameraSong = camerasong.transform.position;
        startnumber = 0;
        currentstartnumber = 0;
        customSearch = false;
        packLocked = "null";

        songCubePack = new Dictionary<GameObject, string>();

        createCubeSong();

        locked = false;

        search = "";
        searchOldValue = "";
        songList = new Dictionary<string, Dictionary<Difficulty, Song>>();

        activeSongList(gs.getZonePack().getActivePack());

        if(DataManager.Instance.mousePosition != -1){
            startnumber = DataManager.Instance.mousePosition;
            currentstartnumber = startnumber;
        }
    }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        if(!LoadManager.Instance.alreadyLoaded) ProfileManager.Instance.CreateTestProfile();
        if(!LoadManager.Instance.alreadyLoaded) TextManager.Instance.LoadTextFile();
        if(!LoadManager.Instance.alreadyLoaded) LoadManager.Instance.Loading();

        gs = GetComponent<GeneralScript>();
        popin = false;
        popout = false;
        activeModule = true;
        numberPack = 0;
        nextnumberPack = 0;

        packs = new Dictionary<GameObject, string>();

        var tempPack = new Dictionary<GameObject, string>();
        var position = 0;
        var thePackPosition = -1;

        foreach(var el in LoadManager.Instance.ListSong().Keys){
            var thego = (GameObject) Instantiate(miniCubePack, new Vector3(0f, 13f, 20f), miniCubePack.transform.rotation);
            thego.SetActive(true);
            if(LoadManager.Instance.ListTexture().ContainsKey(el)) thego.renderer.material.mainTexture = LoadManager.Instance.ListTexture()[el];
            tempPack.Add(thego, el);
            if(el == DataManager.Instance.packSelected) thePackPosition = position;

            position++;
        }

        if(DataManager.Instance.packSelected != "" && thePackPosition != -1){
            for(int i=thePackPosition;i<tempPack.Count;i++){
                packs.Add(tempPack.ElementAt(i).Key, tempPack.ElementAt(i).Value);
            }
            for(int i=0;i<thePackPosition;i++){
                packs.Add(tempPack.ElementAt(i).Key, tempPack.ElementAt(i).Value);
            }
        }else{
            for(int i=0;i<tempPack.Count;i++){
                packs.Add(tempPack.ElementAt(i).Key, tempPack.ElementAt(i).Value);
            }
        }

        organiseCube(0);

        fadeAlpha = 0f;
    }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        gs = GetComponent<GeneralScript>();
        activeModule = false;
        displayLoading = false;
        time = 0f;
        alphaSongLaunch = new float[6];
        for(int i=0;i<6; i++){ alphaSongLaunch[i] = 0f; }

        alphaBlack = 0f;

        if(DataManager.Instance.quickMode){
            speedAlphaSongLaunch = 0.1f;
            speedAlphaBlack = 0.1f;
        }
    }