コード例 #1
0
ファイル: ResultAction.cs プロジェクト: LevartC/MaxumNoiz
    // Use this for initialization
    void Start()
    {
        // 배경 비디오 로드
        if (Global.modeVideoName != null)
        {
            MediaPlayerCtrl videoCache;
            GameObject      tmpGO = RSC.GetVideo(Global.modeVideoName[(int)Global.currentSelectMode]) as GameObject;
            if (tmpGO != null)
            {
                videoCache = tmpGO.GetComponent <MediaPlayerCtrl>();
                if (videoCache != null)
                {
                    videoCache.m_TargetMaterial[0] = bgObject;
                    videoCache.Play();
                }
                else
                {
                    Debug.Log("Cannot load videocache.");
                }
            }
            else
            {
                Debug.Log("Object not Found");
            }
        }
        else
        {
            Debug.Log("Cannot load videocache.");
        }


        // 타이틀 이미지 로드
        if (Global.musicInfo != null)
        {
            Sprite tmpSpr = RSC.GetSprite(Global.musicInfo[Global.currentSelectMusic].pngName);
            if (tmpSpr != null)
            {
                titleObject.GetComponent <UI2DSprite>().sprite2D = tmpSpr;
            }
            else
            {
                Debug.Log("Cannot Load title image.");
            }
        }

        // 타이틀, 아티스트 라벨 로드
        titleLabel.GetComponent <UILabel>().text  = Global.musicInfo[Global.currentSelectMusic].titleName;
        artistLabel.GetComponent <UILabel>().text = Global.musicInfo[Global.currentSelectMusic].makerName;
    }
コード例 #2
0
ファイル: IngameLoading.cs プロジェクト: LevartC/MaxumNoiz
 // Use this for initialization
 void Start()
 {
     // 타이틀 이미지 로드
     if (Global.musicInfo != null)
     {
         Sprite tmpSpr = RSC.GetSprite(Global.musicInfo[Global.currentSelectMusic].pngName);
         if (tmpSpr != null)
         {
             titleObject.GetComponent <UI2DSprite>().sprite2D = tmpSpr;
         }
         else
         {
             Debug.Log("Cannot Load title image.");
         }
     }
 }
コード例 #3
0
ファイル: ReadySceneAction.cs プロジェクト: LevartC/MaxumNoiz
    // Use this for initialization
    void Start()
    {
        // 배경 비디오 로드
        if (Global.modeVideoName != null)
        {
            MediaPlayerCtrl videoCache;
            GameObject      tmpGO = RSC.GetVideo(Global.modeVideoName[(int)Global.currentSelectMode]) as GameObject;
            if (tmpGO != null)
            {
                videoCache = tmpGO.GetComponent <MediaPlayerCtrl>();
                if (videoCache != null)
                {
                    videoCache.m_TargetMaterial[0] = bgObject;
                    videoCache.Play();
                }
                else
                {
                    Debug.Log("Cannot load videocache.");
                }
            }
            else
            {
                Debug.Log("Object not Found");
            }
        }
        else
        {
            Debug.Log("Cannot load videocache.");
        }

        // 미리듣기 로드
        AudioClip tmpAudio = RSC.GetAudio(Global.musicInfo[Global.currentSelectMusic].prevName);

        if (tmpAudio != null)
        {
            titleObject.GetComponent <AudioSource>().clip = tmpAudio;
            titleObject.GetComponent <AudioSource>().Play();
        }
        else
        {
            Debug.Log("Cannot Load audio.");
        }

        // 난이도 스프라이트 로드
        easyButtonIdle   = easyButton.GetComponent <UI2DSprite>().sprite2D;
        normalButtonIdle = normalButton.GetComponent <UI2DSprite>().sprite2D;
        hardButtonIdle   = hardButton.GetComponent <UI2DSprite>().sprite2D;
        Global.currentSelectDifficulty = Difficulty.Easy;
        changeDifficulty(Global.currentSelectDifficulty);

        // 타이틀 이미지 로드
        if (Global.musicInfo != null)
        {
            Sprite tmpSpr = RSC.GetSprite(Global.musicInfo[Global.currentSelectMusic].pngName);
            if (tmpSpr != null)
            {
                titleObject.GetComponent <UI2DSprite>().sprite2D = tmpSpr;
                // 곡 락 여부
                if (Global.musicInfo[Global.currentSelectMusic].isLocked != 0)
                {
                    titleObject.GetComponent <UI2DSprite>().color = new Color(1, 1, 1, 0.5f);
                    obj_TitleLock.SetActive(true);
                    obj_UnlockTooltip.SetActive(true);
                }
            }
            else
            {
                Debug.Log("Cannot Load title image.");
            }
        }

        // 스타트 버튼, 아이템 버튼 활성화 조정
        if (Global.musicInfo[Global.currentSelectMusic].isLocked != 0)
        {
            startButton.SetActive(false);
            itemButtons.SetActive(false);
        }

        // 타이틀, 아티스트 라벨 로드
        titleLabel.GetComponent <UILabel>().text  = Global.musicInfo[Global.currentSelectMusic].titleName;
        artistLabel.GetComponent <UILabel>().text = Global.musicInfo[Global.currentSelectMusic].makerName;

        // BGM 페이드아웃 준비
        Global.bgmVolume = Global.outGameBGM.volume = 1f;

        alpha_Tooltip       = 0f;
        alpha_UnlockTooltip = 5f;
    }
コード例 #4
0
ファイル: MusicSelect.cs プロジェクト: LevartC/MaxumNoiz
    // Use this for initialization
    void Start()
    {
        // 배경 비디오 로드
        if (Global.modeVideoName != null)
        {
            MediaPlayerCtrl videoCache;
            GameObject      tmpGO = RSC.GetVideo(Global.modeVideoName[(int)Global.currentSelectMode]) as GameObject;
            if (tmpGO != null)
            {
                videoCache = tmpGO.GetComponent <MediaPlayerCtrl>();
                if (videoCache != null)
                {
                    videoCache.m_TargetMaterial[0] = bgObject;
                    videoCache.Play();
                }
                else
                {
                    Debug.Log("Cannot load videocache.");
                }
            }
            else
            {
                Debug.Log("Object not Found");
            }
        }
        else
        {
            Debug.Log("Cannot load videocache.");
        }

        // 수록곡 정보 로드
        if (Global.musicInfo != null)
        {
            List <MusicInfo> tmpInfoList = Global.musicInfo.Values.ToList();
            for (int i = 0; i < tmpInfoList.Count; ++i)
            {
                MusicInfo  tmpInfo   = tmpInfoList[i];
                GameObject tmpObject = Instantiate(dummyTitle) as GameObject;
                tmpObject.transform.SetParent(titleGrid.transform);
                tmpObject.transform.localScale = new Vector3(1, 1, 1);
                tmpObject.name = tmpInfo.id.ToString();
                tmpObject.transform.FindChild("Title_Thumb").GetComponent <UI2DSprite>().sprite2D = RSC.GetSprite(tmpInfoList[i].mpngName);
                if (tmpInfo.isLocked != 0)
                {
                    tmpObject.transform.FindChild("Title_Thumb").GetComponent <UI2DSprite>().color = new Color(1, 1, 1, 0.5f);
                    tmpObject.transform.FindChild("Title_Lock").gameObject.SetActive(true);
                }
                //              tmpObject.transform.FindChild("ID Label").GetComponent<UILabel>().text = "";
                tmpObject.transform.FindChild("Title Label").GetComponent <UILabel>().text = tmpInfo.titleName;
                tmpObject.transform.FindChild("Maker Label").GetComponent <UILabel>().text = tmpInfo.makerName;
            }
        }
        titleGrid.GetComponent <UIGrid>().Reposition();

        /*
         * if (Global.musicInfo.Count % 2 == 0)
         * {
         *  Vector3 tmpVec = titleGrid.transform.parent.localPosition;
         *  tmpVec.y = 0f;
         *  titleGrid.transform.parent.localPosition = tmpVec;
         * }*/
    }