예제 #1
0
 // Use this for initialization
 void Start()
 {
     ms = MenuState.NOT_SELECT;
     //クラス取得
     menurestartManager = GameObject.Find("MenuManager").GetComponent <MenuConfirmationRestart>();
     menuselectManager  = GameObject.Find("MenuManager").GetComponent <MenuConfirmationSelect>();
     pause     = GameObject.Find("PauseManager").GetComponent <PauseManager>();
     timestart = GameObject.Find("StageManager").transform.Find("ViewTimeMain").gameObject;
     stageMG   = GameObject.Find("StageManager").GetComponent <StageManager>();
     //座標取得
     backgroundTransform  = GameObject.Find("black_background_Confirmation").transform;
     stageselectTransform = GameObject.Find("Copy of text_window").transform;
     restartTransform     = GameObject.Find("Copy of text_window_stage_select").transform;
     menutextTransform    = GameObject.Find("menuscreen").transform;
     //transformの座標をvector3の値保有変数に渡す
     backgroundPosition = backgroundTransform.position;
     selectPosition     = stageselectTransform.position;
     restartPosition    = restartTransform.position;
     menuPosition       = menutextTransform.position;
 }
    // Use this for initialization
    private void Start()
    {
        buttonnowtime  = 0.0f;
        changecolorflg = false;
        mcr            = GameObject.Find("MenuManager").GetComponent <MenuConfirmationRestart>();
        //色を変更するゲームオブジェクトを入手
        rsbuttoncolor  = GameObject.Find("Copy of button_yes_1");
        rsbuttoncolor2 = GameObject.Find("Copy of button_no_1");
        //今の色コンソールに出力
        Debug.Log(rsbuttoncolor.GetComponent <Renderer>().material.color);
        Debug.Log(rsbuttoncolor2.GetComponent <Renderer>().material.color);

        this.audioclip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioclip[(int)AudioList.AUDIO_YES].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioclip[(int)AudioList.AUDIO_YES].Vol  = 1.0f;
        this.audioclip[(int)AudioList.AUDIO_NO].Clip  = Resources.Load("Audio/SE/Button_No", typeof(AudioClip)) as AudioClip;
        this.audioclip[(int)AudioList.AUDIO_NO].Vol   = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioclip;
    }