예제 #1
0
    void Start()
    {
        ardBlue      = GameObject.Find("ArdBlue").GetComponent <ArdBlue_Unity>();
        fadeScreen   = GameObject.Find("BlackScreen").GetComponent <FadeScreen>();
        audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>();

        source      = GetComponent <AudioSource>();
        source.clip = mainSong;

        mainStart();

        min1_on  = 0.05f;
        max1_on  = 0.2f;
        min1_off = 0.5f;
        max1_off = 4f;

        min2_on  = 0.05f;
        max2_on  = 0.2f;
        min2_off = 0.5f;
        max2_off = 5f;


        isOn1   = true;
        isOn2   = true;
        isStart = false;
        StartCoroutine(arrowColor());
        StartCoroutine(textColor());
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        ardBlue      = GameObject.Find("ArdBlue").GetComponent <ArdBlue_Unity>();
        fadeScreen   = GameObject.Find("BlackScreen").GetComponent <FadeScreen>();
        audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>();

        isStart = false;
    }
예제 #3
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
         return;
     }
     instance = this;
     DontDestroyOnLoad(this);
 }
예제 #4
0
    void Start()
    {
        VP[0] = V[0].GetComponent <VideoPlayer>();
        VP[1] = V[1].GetComponent <VideoPlayer>();
        VP[2] = V[2].GetComponent <VideoPlayer>();
        VP[3] = V[3].GetComponent <VideoPlayer>();
        VP[4] = V[4].GetComponent <VideoPlayer>();
        VP[5] = V[5].GetComponent <VideoPlayer>();

        ardBlue        = GameObject.Find("ArdBlue").GetComponent <ArdBlue_Unity>();
        playMusic      = GetComponent <PlayMusic>();
        sceneLoader    = GameObject.Find("SceneLoader").GetComponent <SceneLoader>();
        audioManager   = GameObject.Find("AudioManager").GetComponent <AudioManager>();
        fadeScreen     = GameObject.Find("BlackScreen").GetComponent <FadeScreen>();
        timer          = 0f;
        GameMode       = 1;
        ardBlue.status = 0;


        change_Video_Name(Num);
        change_bpmText(Num);
        change_difficulty(Num, GameMode);
        fadeScreen.fadeIn();
    }
예제 #5
0
    public int mode;  // 곡 난이도. 1: 이지, 2: 하드



    void Start()
    {
        Persent      = 0f; Combo = 0; HighCombo = 0;
        Pf           = 0; Gd = 0; Bd = 0; Ms = 0;
        Speed        = 7f;
        lineFade     = GameObject.Find("Check").GetComponent <LineFade>();
        ardBlue      = GameObject.Find("ArdBlue").GetComponent <ArdBlue_Unity>();
        songManager  = GetComponent <SongManager>();
        audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>();
        msNum        = PlayingManagement.Num;
        mode         = PlayingManagement.GameMode;

        songManager.SongPlay(msNum);

        perfect.color = new Color(1f, 1f, 1f, 0f);
        good.color    = new Color(1f, 1f, 1f, 0f);
        bad.color     = new Color(1f, 1f, 1f, 0f);
        miss.color    = new Color(1f, 1f, 1f, 0f);

        switch (msNum)
        {
        case 0:     // Going to School
            if (mode == 1)
            {
                GetComponent <Forest_For_Rest_E>().enabled = true;
                Debug.Log("Easy");
            }
            else
            {
                GetComponent <Forest_For_Rest_H>().enabled = true;
                Debug.Log("Hard");
            }

            background.sprite = backgroundImages[0];
            musicLength       = 108;
            break;

        case 1:
            if (mode == 1)
            {
                GetComponent <HOWUSE_E>().enabled = true;
                Debug.Log("Easy");
            }
            else
            {
                GetComponent <HOWUSE_H>().enabled = true;
                Debug.Log("Hard");
            }

            background.sprite = backgroundImages[1];
            musicLength       = 106;
            break;

        case 2:
            if (mode == 1)
            {
                GetComponent <Futuring_E>().enabled = true;
                Debug.Log("Easy");
            }
            else
            {
                GetComponent <Futuring_H>().enabled = true;
                Debug.Log("Hard");
            }

            background.sprite = backgroundImages[2];
            musicLength       = 146;
            break;

        case 3:
            if (mode == 1)
            {
                GetComponent <Way_Back_Home_E>().enabled = true;
                Debug.Log("Easy");
            }
            else
            {
                GetComponent <Way_Back_Home_H>().enabled = true;
                Debug.Log("Hard");
            }

            background.sprite = backgroundImages[3];
            musicLength       = 149;
            break;

        case 4:
            if (mode == 1)
            {
                GetComponent <Lets_Play_E>().enabled = true;
                Debug.Log("Easy");
            }
            else
            {
                GetComponent <Lets_Play_H>().enabled = true;
                Debug.Log("Hard");
            }

            background.sprite = backgroundImages[4];
            musicLength       = 122;
            break;

        case 5:
            if (mode == 1)
            {
                GetComponent <BeLoved_Memory_E>().enabled = true;
                Debug.Log("Easy");
            }
            else
            {
                GetComponent <BeLoved_Memory_H>().enabled = true;
                Debug.Log("Hard");
            }

            background.sprite = backgroundImages[5];
            musicLength       = 122;
            break;
        }


        StartCoroutine(GoResult(musicLength));
    }
예제 #6
0
 void Start()
 {
     ardBlue     = GameObject.Find("ArdBlue").GetComponent <ArdBlue_Unity>();
     sceneLoader = GameObject.Find("SceneLoader").GetComponent <SceneLoader>();
 }