private void OnTriggerEnter(Collider other) { if (!goal) { //チュートリアルか確認 TutorialScene t = FindObjectOfType <TutorialScene>(); if (other.gameObject.tag == TagName.Player || other.gameObject.tag == TagName.Fake) { //何度も呼ばれないように goal = true; ScoreManager.Instance.SetTimeScore(); ScoreManager.Instance.SetDiscoveryScore(); if (t == null) { SoundManager.Instance.StopBGM(); SceneManager.Instance.LoadScene(SceneManager.ClearMovieScene); } else { SceneManager.Instance.LoadScene(SceneManager.ConnectScene); } } } }
// Use this for initialization void Start() { m_LifeCount = Lifes.Count - 1; //チュートリアルかどうかの確認 t = FindObjectOfType <TutorialScene>(); }
IEnumerator InstantTutorial() { m_Status = GameStatus.Idle; yield return(new WaitForSeconds(1f)); m_Status = GameStatus.InTutorial; Tutorial = Instantiate(ResourceLoadUtils.Load <TutorialScene>("CorePlay/TutorialNode")); }
protected override void Start() { base.Start(); modeSelect(E_GameMode.gameStart); TS = this.gameObject.GetComponent <TutorialScene>(); musicManager.PlayBGM(MusicManager.BGM_SELECT.title); }
public static IScenarioDescription GetTutorialDescription(TutorialScene scene, Control control) { switch(tutorialType){ case 1: return new BasicTutorial(scene, control); case 2: return new SkillTutorial(scene, control); default: return new BasicTutorial(scene, control); } }
void Awake() { blockManager = blockManagerObj.GetComponent <BlockManager>(); wizardCtrl = player.GetComponent <WizardCtrl>(); tutorialScene = gameObject.GetComponent <TutorialScene>(); soundManager = GameObject.FindWithTag("AudioManager").GetComponent <SoundManager>(); for (int i = 0; i < blockManager.Blocks.Length; i++) { blockManager.SetblockState(i, "Unmovable"); } }
public void Reset() { if (m_Tap != null) { m_Tap.Delete(); } obj_hand.SetActive(false); VoiceController.instance.Restart(); AudioController.StopCategory("Other"); XunFeiSRManager.Instance.StopListen(); MicManager.Instance.StopRecord(); Instance = null; Destroy(transform.gameObject); }
private void OnTriggerStay2D(Collider2D collision) { if (collision.gameObject.name == "MainHero" && GameStatusPrefab.IsActive) { Debug.Log("Next Tutorial tip"); //makes the trigger zone unenabled Destroy(this.gameObject); // TutorialScene.ChangeTheText(); //tip number is getting bigger TutorialScenePrefab.TipNumber++; // GameStatusPrefab.Pause(); } }
private void Skip(AudioObject audioObject) { obj_hand.SetActive(false); if (m_Tap != null) { m_Tap.Delete(); } SelfPlayerData.NewPlayer = false; VoiceController.instance.Restart(); SaveDataUtils.Save <SelfPlayerData>(); AudioController.StopCategory("Other"); XunFeiSRManager.Instance.StopListen(); MicManager.Instance.StopRecord(); Instance = null; Destroy(transform.gameObject); }
private void Start() { Instance = this; Pause = false; BPM = 60; //m_Status = TutorialStatus.StartPlayMusic; m_Status = TutorialStatus.ErJi; m_Beat = 60000f / BPM; m_Skip.transform.GetComponent <Button>().onClick.AddListener(() => { AnalysisManager.Instance.OnEvent("100005", null, "新手", "跳过新手"); Skip(null); }); m_Zhuyi.SetActive(false); RepetNum = 0; ClickPefect = false; }
/// <summary> /// 设置当前场景 /// </summary> public void SetState(SceneState sceneState, bool isNow = true, bool isAsync = false) { ISceneState State; switch (sceneState) { case SceneState.StartState: State = new StartState(this); break; case SceneState.MainScene: State = new MainScene(this); break; case SceneState.TrainScene: State = new TrainScene(this); break; case SceneState.VillageScene: State = new VillageScene(this); break; case SceneState.TutorialScene: State = new TutorialScene(this); break; case SceneState.BattleEyeball: State = new BattleEyeball(this); break; case SceneState.BattleMonster: State = new BattleMonster(this); break; case SceneState.BattleStrongKnight: State = new BattleStrongKnight(this); break; case SceneState.BattleFantasy: State = new BattleFantasy(this); break; case SceneState.BattleForestNight: State = new BattleForestNight(this); break; case SceneState.BattleForestDay: State = new BattleForestDay(this); break; default: return; } Debug.Log("切换场景:" + State.ToString()); isSceneBegin = false; // 通知前一個State結束 if (CurState != null) { CurState.StateEnd(); } // 载入场景 if (isNow) { if (isAsync) { UILoading.nextScene = State.StateName; LoadScene("Loading"); } else { LoadScene(State.StateName); } } //设置当前场景 CurState = State; }
void Awake() { Instance = this; }
public SkillTutorial(TutorialScene scene, Control control) { tutorialScene = scene; this.control = control; }
public TutorialBasicCondition(IScenarioDescription receiver, TutorialScene scene) { this.receiver = receiver; tutorialScene = scene; }
public static TutorialCondition Create(IScenarioDescription receiver, TutorialScene scene) { return new TutorialBasicCondition(receiver, scene); }
public BasicTutorial(TutorialScene scene, Control control) { tutorialScene = scene; this.control = control; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); #if Debug blackRect= Content.Load<Texture2D>(@"Textures\darkBackground"); #endif goldPlusEffect10 = Content.Load<Texture2D>(@"ui\goldPlus10"); goldPlusEffect15 = Content.Load<Texture2D>(@"ui\goldPlus15"); lifePlusEffect10 = Content.Load<Texture2D>(@"ui\lifePlus10"); lifePlusEffect15 = Content.Load<Texture2D>(@"ui\lifePlus15"); darkBackgroundImage = Content.Load<Texture2D>(@"Textures\darkBackground"); go_back = Content.Load<Texture2D>(@"ui\go_back"); go_front = Content.Load<Texture2D>(@"ui\go_front"); //이거 없으면 STARTNOTE TEXTURE가 NULL이라 위치값을 잘못 줄때가 있다. spriteSheet = Content.Load<Texture2D>(@"ui\SpriteSheet8"); backJesture = Content.Load<Texture2D>(@"game1\backJesture"); backJestureManager = new BackJestureManager(backJesture, new Rectangle(0, 0, 204, 204), 10, new Vector2(800, 500)); //타이틀화면 menuScene = new MenuScene(); menuScene.LoadContent(Content); uiEnergyBackground = Content.Load<Texture2D>(@"ui\uiEnergyBackground"); energyDarkBack = Content.Load<Texture2D>(@"ui\energyDarkBack"); processBar = Content.Load<Texture2D>(@"ui\processBar"); processMark = Content.Load<Texture2D>(@"ui\processMark"); //아이템관리 //startnotemanager 생성보다 앞에 있어야 한다. itemManager = new ItemManager(); itemManager.LoadContent(Content); itemManager.Init(); loadingScene = new LoadingScene(); //loadingScene.LoadContent(Content); //게임중 점수관리 scoreManager = new ScoreManager(); //상점 대문2 shopDoor = new ShopDoor(scoreManager); shopDoor.LoadContent(Content); //점수 기록 (TO FILE) reportManager = new ReportManager(scoreManager); /////아이템 상점 -START rightItemShop = new RightItemShop(itemManager, scoreManager, reportManager); rightItemShop.LoadContent(Content); leftItemShop = new LeftItemShop(itemManager, scoreManager, reportManager); leftItemShop.LoadContent(Content); effectItemShop = new EffectItemShop(itemManager, scoreManager, reportManager); effectItemShop.LoadContent(Content); noteItemShop = new NoteItemShop(itemManager, scoreManager, reportManager); noteItemShop.LoadContent(Content); backgroundItemShop = new BackgroundItemShop(itemManager, scoreManager, reportManager); backgroundItemShop.LoadContent(Content); /////아이템 상점 -START //연주자 memberManager = new MemberManager(scoreManager); memberManager.LoadContent(Content); memberManager.init(); /////텍스쳐 로드 -START //배경 //playBackgroud1 = Content.Load<Texture2D>(@"background\ConcertHall_3"); //playBackgroud2 = Content.Load<Texture2D>(@"background\crosswalk3"); //노트,마커 // spriteSheet = Content.Load<Texture2D>(@"Textures\SpriteSheet8"); //드래그 노트 // heart = Content.Load<Texture2D>(@"Textures\heart"); //진행상황 //uiBackground = Content.Load<Texture2D>(@"ui\background"); energy = Content.Load<Texture2D>(@"ui\energy"); //골드 업어 getGold = Content.Load<Texture2D>(@"gold\getGold"); //폰트 georgia = Content.Load<SpriteFont>(@"Fonts\Georgia"); //perfect,good,bad,miss 판정 배너 perfectBanner = Content.Load<Texture2D>(@"judgement\perfect"); goodBanner = Content.Load<Texture2D>(@"judgement\good"); badBanner = Content.Load<Texture2D>(@"judgement\bad"); missBanner = Content.Load<Texture2D>(@"judgement\miss"); noPerson = Content.Load<Texture2D>(@"game1\noperson"); rightHandTextures = itemManager.GetRightHandTexture(); leftHandTextures = itemManager.GetLeftHandTexture(); //드래그 노트 셀떄 one = Content.Load<Texture2D>(@"ui\one"); two = Content.Load<Texture2D>(@"ui\two"); three = Content.Load<Texture2D>(@"ui\three"); previousButton = Content.Load<Texture2D>(@"game1\previousButton"); hoverPreviousButton = Content.Load<Texture2D>(@"game1\hoverPrevious"); nextButton = Content.Load<Texture2D>(@"game1\nextButton"); hoverNextButton = Content.Load<Texture2D>(@"game1\hoverNextButton"); loadingForAngle = Content.Load<Texture2D>(@"ui\LoadingKinect"); // charisma1 = Content.Load<Texture2D>(@"shopdoor\nogold"); /////텍스쳐 로드 -END /////////////////드래그 라인 관련 //드래그 라인 // drawLineNote1 = Content.Load<Texture2D>(@"DrawLine\drawLineNote1"); //드래그 라인 마커점 drawLineMarker = Content.Load<Texture2D>(@"DrawLine\drawLineMark"); gold = Content.Load<Texture2D>(@"gold\gold"); menuGold = Content.Load<Texture2D>(@"game1\menuGold"); levelTexture = Content.Load<Texture2D>(@"game1\level"); //로드하고, 기본적으로 넣어줌 itemManager.LoadFileItem(); //현재 장착한 이펙트의 인덱스를 전체 베이스에 찾음 int effectIndex = itemManager.getEffectIndex(); //콤보 숫자 comboNumberManager = new ComboNumberManager(); comboNumberManager.LoadContent(Content); //***결과화면 숫자 //resultNumberManager = new ResultNumberManager(); // resultNumberManager.LoadContent(Content); tutorialScene = new TutorialScene(); tutorialScene.Load(Content); //드래그 라인 렌더링 dragLineRenderer = new LineRenderer(); //드래그 라인 안의 마커점의 렌더링 dragLineMarkerRenderer = new LineRenderer(); //드래그라인 curveManager = new CurveManager(dragLineRenderer, dragLineMarkerRenderer,dragNoteManager,itemManager); //가이드 라인 렌더링 guideLineRenderer = new LineRenderer(); //가이드 라인 guideLineManager = new GuideLineManager(guideLineRenderer); //텍스쳐 크기 ///////이펙트 생성 -START //폭발 효과 perfectManager = new PerfectExplosionManager(); perfectManager.ExplosionInit(itemManager.GetEffectTexture()[effectIndex], itemManager.GetEffectInitFrame()[effectIndex], itemManager.GetEffectFrameCount()[effectIndex], itemManager.GetEffectScale()[effectIndex], itemManager.GetEffectDulation()[effectIndex]); goodManager = new GoodExplosionManager(); goodManager.ExplosionInit(itemManager.GetGoodEffectTexture()[effectIndex], itemManager.GetEffectInitFrame()[effectIndex], itemManager.GetEffectFrameCount()[effectIndex], itemManager.GetEffectScale()[effectIndex], itemManager.GetEffectDulation()[effectIndex]); badManager = new BadExplosionManager(); badManager.ExplosionInit(itemManager.GetBadEffectTexture()[effectIndex], itemManager.GetEffectInitFrame()[effectIndex], itemManager.GetEffectFrameCount()[effectIndex], itemManager.GetEffectScale()[effectIndex], itemManager.GetEffectDulation()[effectIndex]); //판정 글씨 나타내기 perfectBannerManager = new PerfectBannerManager(); perfectBannerManager.BannerInit(perfectBanner,new Rectangle(0,0,1380,428),/*sprite로 바꾸면 frameCount바꾸기*/1,0.5f,30); goodBannerManager = new GoodBannerManager(); goodBannerManager.BannerInit(goodBanner, new Rectangle(0, 0, 1020, 368),/*sprite로 바꾸면 frameCount바꾸기*/1, 0.5f, 30); badBannerManager = new BadBannerManager(); badBannerManager.BannerInit(badBanner, new Rectangle(0, 0, 782, 400),/*sprite로 바꾸면 frameCount바꾸기*/1, 0.7f, 30); missBannerManager = new MissBannerManager(); missBannerManager.BannerInit(missBanner, new Rectangle(0, 0, 975, 412),/*sprite로 바꾸면 frameCount바꾸기*/1, 0.5f,30); //일단은 miss effect로 goldGetManager = new ExplosionManager(); goldGetManager.ExplosionInit(getGold,new Rectangle(0,0,200,200), 5, 1.0f, 40); ///////이펙트 생성 -END //시작 노트 관리 생성 //여기에 들어가는 텍스쳐가 노트의 텍스쳐가 된다. //상점의 텍스쳐가 들어가야 한다. startNoteManager = new StartNoteManager( spriteSheet, new Rectangle(0, 200, 52, 55), 1); //첫 마커 위치 //마커 위치 처음 시작은 일단 마커매니저의 제일 0번째 것으로 시작 Vector2[] initMarkLocation = MarkManager.GetPattern(0); // removeAreaRec = MarkManager.GetRemoveArea(0); //마크 관리 초기화 (STATIC) //***시작시 마커 위치에 관한 사항 결정 못함. MarkManager.initialize( spriteSheet, new Rectangle(0, 200, 50, 55), 1, initMarkLocation[0], initMarkLocation[1], initMarkLocation[2], initMarkLocation[3], initMarkLocation[4], initMarkLocation[5], startNoteManager ); //카리스마 매니저 charismaManager = new CharismaManager(); charismaManager.LoadContent(Content); //드래그노트 초기화 //이것은 노트 안에서 움직이는 마커점 dragNoteManager = new DragNoteManager( drawLineMarker, itemManager.GetDragNoteBackground()[itemManager.getNoteIndex()], new Rectangle(0, 0, 100, 100), 1, 15, 0, missBannerManager, scoreManager); //충돌관리 생성 collisionManager = new CollisionManager(perfectManager, goodManager, badManager, goldGetManager, scoreManager, memberManager,/*effect크기*/itemManager,perfectBannerManager,goodBannerManager,badBannerManager,missBannerManager,new Vector2(this.Window.ClientBounds.Width,this.Window.ClientBounds.Height),comboNumberManager,charismaManager,dragNoteManager); //노트정보 관리 생성 noteFileManager = new NoteFileManager(); //드래그 라인 렌더링 dragLineRenderer = new LineRenderer(); dragLineMarkerRenderer = new LineRenderer(); //드래그라인 curveManager = new CurveManager(dragLineRenderer, dragLineMarkerRenderer, dragNoteManager,itemManager); // photoManager = new PhotoManager(); // photoManager.LoadContent(Content); //노트파일 읽기 관리 생성 file = new File(startNoteManager, noteFileManager, collisionManager, scoreManager, itemManager, curveManager, guideLineManager, charismaManager); SoundFmod.initialize(file); //곡선택화면 곡 불러오는 폴더 //노래폴더 만들기 위해서 테스트 // String songFile = System.Environment.CurrentDirectory+"\\beethovenSong\\song.txt"; String dir = System.Environment.CurrentDirectory + "\\beethovenSong"; DirectoryInfo di = new DirectoryInfo(dir); if (di.Exists == false) { di.Create(); } //기록 만들기 위해서 테스트 // String songRecordFile = System.Environment.CurrentDirectory + "\\beethovenRecord\\song.txt"; String songRecorddir = System.Environment.CurrentDirectory + "\\beethovenRecord"; DirectoryInfo diRecord = new DirectoryInfo(songRecorddir); if (diRecord.Exists == false) { diRecord.Create(); } //사진 폴더 위해서 테스트 //String picFile = System.Environment.CurrentDirectory + "\\beethovenRecord\\userPicture\\song.txt"; String picddir = System.Environment.CurrentDirectory + "\\beethovenRecord\\userPicture"; String defaultPicture = System.Environment.CurrentDirectory + "\\No_Image.png"; DirectoryInfo diPic = new DirectoryInfo(picddir); if (diPic.Exists == false) { diPic.Create(); FileInfo fileInfo = new FileInfo(defaultPicture); fileInfo.CopyTo(System.Environment.CurrentDirectory + "\\beethovenRecord\\UserPicture\\No_Image.png"); } //곡을 불러오기 file.FileLoading(dir, "*.mnf"); ////드래그노트 초기화 ////이것은 노트 안에서 움직이는 마커점 //dragNoteManager = new DragNoteManager( // drawLineMarker, // new Rectangle(0, 0, 100, 100), // 1, // 15, // 0, // missBannerManager, // scoreManager); //골드 초기화 //크기 0.3 GoldManager.initialize( gold, new Rectangle(0, 0, 200, 200), 1, 70, 0, 0.3f); //*** resultManager = new ResultManager(scoreManager); resultManager.LoadContent(Content); //점수기록판 화면 recordBoard = new RecordBoard(); recordBoard.LoadContent(Content); #if Kinect settingBoard = new SettingBoard(this); settingBoard.LoadContent(Content); #endif showPictureScene = new ShowPictureScene(); showPictureScene.LoadContent(Content); songMenu = new SongMenu(noteFileManager, reportManager); songMenu.Load(Content, graphics.GraphicsDevice); //LOAD REPORT SCORE FILE //점수기록판을 로드해서 게임에 올린다. reportManager.LoadReport(); //골드를 로드해서 게임에 올린다. reportManager.LoadGoldFromFile(); currentSongName = ""; // itemManager.LoadFileItem(); #if Kinect // messageFont = Content.Load<SpriteFont>("MessageFont"); setupKinect(); /*제스쳐 인식인데 전체 구간에서 계속 실행 된다. *이것이 다른것에 영향을 줄 수도 있다. */ activeRecognizer = CreateRecognizer(); //!!! 페이스 인식, 디버깅 시에 잠시 #if StartDetact settingBoard.LoadCheckFile(); if(settingBoard.CheckFaceDetact) { //0 각도 재야함 // 1 각도 잴필요없음 //2 끝남 loadingTime = 0; ts4 = new ThreadStart(FaceDetect); th4 = new Thread(ts4); th4.Start(); } #endif #endif playingPictures = new Queue(); showPictureTextures = new Texture2D[5]; metronomes = new Texture2D[8]; metronomes[0] = Content.Load<Texture2D>(@"metronome\metronome0"); metronomes[1] = Content.Load<Texture2D>(@"metronome\metronome1"); metronomes[2] = Content.Load<Texture2D>(@"metronome\metronome2"); metronomes[3] = Content.Load<Texture2D>(@"metronome\metronome3"); metronomes[4] = Content.Load<Texture2D>(@"metronome\metronome4"); metronomes[5] = Content.Load<Texture2D>(@"metronome\metronome5"); metronomes[6] = Content.Load<Texture2D>(@"metronome\metronome6"); metronomes[7] = Content.Load<Texture2D>(@"metronome\metronome7"); }
protected override void Update() { //Enemyの更新 base.Update(); //現在のアニメ―ションの状態を取得 int anim = m_animator.CurrentStateHash; if (m_navAgent.speed.SafeEquals(m_profile.RunSpeed)) { //走行アニメーションになっていなければ if (anim != m_animator.GetStateHash(PrinceAnimator.StateName.Run)) { //走行アニメーション m_animator.SetDoRun(); } } //目的地に移動完了したら立ち止まる if (transform.position.x.SafeEquals(m_navAgent.destination.x) && transform.position.z.SafeEquals(m_navAgent.destination.z)) { //待機アニメーションになっていなければ if (m_elapsedTime == 0 && !m_pumpkin) { //待機アニメーション m_animator.SetDoStop(); } m_elapsedTime += Time.deltaTime; } if (m_elapsedTime > m_waitTime) { m_elapsedTime = 0; m_arrivedCount++; //一巡したら初期化 if (m_arrivedCount >= m_movePosList.Count) { m_arrivedCount = 0; } if (isChase) { isChase = false; } //止まる時間の変更 m_waitTime = m_originWaitTime; for (int i = 0; i < m_stopPosNum.Length; i++) { if (m_arrivedCount == m_stopPosNum[i]) { m_waitTime = m_stopPosWaitTime; break; } } //歩行アニメーション m_animator.SetDoWalk(); m_navAgent.SetDestination(m_movePosList[m_arrivedCount]); } //シンデレラと距離が近ければ探す if (m_distance < m_profile.SensingRange) { SearchPlayer(); //ストーキング判定 if (m_distance < m_stakingRange && !m_memoFinish && GameScene.Instance.Cinderella.tag == TagName.Player) { IsStalking(); GameScene.Instance.Cinderella.IsStalking(); } else { GameScene.Instance.Cinderella.NotStalking(); } } //ストーキングポイントが上限値を超えたら if (m_stalkingPoint > m_stalkingPointMax) { m_stalkingPoint = m_stalkingPointMax; MemoEvent(); } if (m_playerFound) { //チュートリアルかどうかの確認 TutorialScene t = FindObjectOfType <TutorialScene>(); m_playerFound = false; //本編 if (t == null) { //プレイヤー発見時、専用のシーンへ移行 m_loadTimer += Time.deltaTime; if (m_loadTimer > 2.0f) { SceneManager.Instance.LoadScene(SceneManager.PrinceEndScene); } } //チュートリアル else { GameScene.Instance.LifeCounter.lifeDamage(); } } }