// Use this for initialization private void Start() { SaveDataManager.Instance.LoadSaveData(); selectStage = SelectStage.NOT_SELECT; stageScript[(int)Stages.STAGE_T1] = GameObject.Find("stage_tutorial1_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_T2] = GameObject.Find("stage_tutorial2_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_T3] = GameObject.Find("stage_tutorial3_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_1] = GameObject.Find("stage_1_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_2] = GameObject.Find("stage_2_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_3] = GameObject.Find("stage_3_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_4] = GameObject.Find("stage_4_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_5] = GameObject.Find("stage_5_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_6] = GameObject.Find("stage_6_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_7] = GameObject.Find("stage_7_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_8] = GameObject.Find("stage_8_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_9] = GameObject.Find("stage_9_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_10] = GameObject.Find("stage_10_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_11] = GameObject.Find("stage_11_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_12] = GameObject.Find("stage_12_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_E1] = GameObject.Find("stage_extra1_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_E2] = GameObject.Find("stage_extra2_image").GetComponent <StageImage>(); stageScript[(int)Stages.STAGE_E3] = GameObject.Find("stage_extra3_image").GetComponent <StageImage>(); stageSelectPlayer = GameObject.Find("StageSelectPlayer").GetComponent <StageSelectPlayer>(); playerDefaultPosition = stageSelectPlayer.gameObject.GetComponent <Transform>().position; startButton = GameObject.Find("StartButton").GetComponent <StartButton>(); mainCamraTransform = GameObject.Find("Main Camera").GetComponent <Transform>(); stageSelectCameraPosition = GameObject.Find("Page1").GetComponent <Transform>().position; stageSelectCameraPosition.z = -10; stageDetailCameraPosition = GameObject.Find("StageDetailBackGround").GetComponent <Transform>().position; stageDetailCameraPosition.z = -10; this.stageDetail = GameObject.Find("ViewStageDetail").GetComponent <StageDetailManager>(); nowPage = 1; rightArrow = GameObject.Find("RightArrow").GetComponent <RightArrow>(); leftArrow = GameObject.Find("LeftArrow").GetComponent <LeftArrow>(); tapFlag = false; pageSet = GameObject.Find("PageSet"); //MovePage(); //他のシーンから戻った際に初期ページ位置変更 this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX]; this.audioClip[0].Clip = Resources.Load("Audio/BGM/BGM_StageSelect", typeof(AudioClip)) as AudioClip; this.audioClip[0].Vol = 1.0f; this.sourceAudio = this.gameObject.AddComponent <SourceAudio>(); this.sourceAudio.m_Audio = this.audioClip; this.sourceAudio.PlayBGM((int)AudioList.AUDIO_BGM, true); CheckUnLock(); }
// Use this for initialization private void Start() { stageSelectManager = GameObject.Find("StageSelectManager").GetComponent <StageSelectManager>(); stageSelectPlayer = GameObject.Find("StageSelectPlayer").GetComponent <StageSelectPlayer>(); swayDegreeMax = stageSelectManager.swayDegreeMax; swayDegreeMin = stageSelectManager.swayDegreeMin; swayTime1 = stageSelectManager.swayTime1; swayTime2 = stageSelectManager.swayTime2; swayTime3 = stageSelectManager.swayTime3; swaySpeed = 0; swayStatus = SWAYSTATUS.NOT_SWAY; defaultPosition = tf.position; defaultRotation = tf.rotation; nowPos = tf.position; clipPosition = tf.parent.position; this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX]; this.audioClip[0].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip; this.audioClip[0].Vol = 1.0f; this.sourceAudio = this.gameObject.AddComponent <SourceAudio>(); this.sourceAudio.m_Audio = this.audioClip; }