public void StartInGamePlay() { if (m_HeroInfo.IsDead == true) { return; } if (m_HuntState == eHuntSceneState.CountDown) { m_HuntState = eHuntSceneState.Hunting; //StartBackground(); m_HeroInfo.PlayAnimation(eCharacterAnimState.Run, true); if (m_MonsterInfo != null) { foreach (CharacterMonster monster in m_MonsterInfo) { //m_MonsterInfo[m_NowMonsterNum].IsPause = false; monster.IsPause = false; } if (m_MonsterInfo[m_NowMonsterNum].IsDead == false && m_MonsterInfo[m_NowMonsterNum].IsMove == true) { m_MonsterInfo[m_NowMonsterNum].PlayAnimation(eCharacterAnimState.Run, true); m_MonsterInfo[m_NowMonsterNum].StartMoveMonster(); } else if (m_MonsterInfo[m_NowMonsterNum].IsDead == false && m_MonsterInfo[m_NowMonsterNum].IsMove == false) { m_MonsterInfo[m_NowMonsterNum].StopMoveMonster(); m_MonsterInfo[m_NowMonsterNum].PlayAnimation(eCharacterAnimState.Run, true); } } if (m_HeroInfo != null && m_HeroInfo.IsDead == false) { m_HeroInfo.IsPause = false; //m_HeroInfo.IsMove = true; } if (m_HeroInfo.IsMove == false) { StopBackground(); } else if (m_HeroInfo.IsMove == true) { StartBackground(); } } }
private void Start() { if (MainController.Instance != null) { int BossID = MainController.Instance.GetStageInfo_BossID(MainController.Instance.SelectStageKind); GameObject obj = ResourceManager.GetOBJCreatePrefab(@"Prefab_Monster\" + MainController.Instance.GetStageBossInfo(BossID).AnimName, Position_Boss.transform); SoundManager.Instance.PlayBGM(eBGMState.Boss_Stage); // 배경 및 BGM 변경 switch (MainController.Instance.SelectStageKind) { case eStageKind.STAGE1: Img_Background.sprite = m_Background[0]; CharacterBoss_KingSlime kingslime = obj.GetComponent <CharacterBoss_KingSlime>(); m_BossInfo = kingslime; m_BossInfo.m_HPBar = Position_Boss_HPBar; m_BossInfo.Position_Damage = Position_Boss_Damage; //m_BossInfo.m_CharacterAnimation = BossAnimcontroller; break; case eStageKind.STAGE2: Img_Background.sprite = m_Background[1]; CharacterBoss_GiantTree giantTree = obj.GetComponent <CharacterBoss_GiantTree>(); m_BossInfo = giantTree; m_BossInfo.m_HPBar = Position_Boss_HPBar; m_BossInfo.Position_Damage = Position_Boss_Damage; break; case eStageKind.STAGE3: Img_Background.sprite = m_Background[2]; CharacterBoss_WeirdSlime weridSlime = obj.GetComponent <CharacterBoss_WeirdSlime>(); m_BossInfo = weridSlime; m_BossInfo.m_HPBar = Position_Boss_HPBar; m_BossInfo.Position_Damage = Position_Boss_Damage; break; case eStageKind.STAGE4: Img_Background.sprite = m_Background[3]; CharacterBoss_AntLion antLion = obj.GetComponent <CharacterBoss_AntLion>(); m_BossInfo = antLion; m_BossInfo.m_HPBar = Position_Boss_HPBar; m_BossInfo.Position_Damage = Position_Boss_Damage; break; case eStageKind.STAGE5: Img_Background.sprite = m_Background[4]; CharacterBoss_IceGolem iceGolem = obj.GetComponent <CharacterBoss_IceGolem>(); m_BossInfo = iceGolem; m_BossInfo.m_HPBar = Position_Boss_HPBar; m_BossInfo.Position_Damage = Position_Boss_Damage; break; } // 용사 초기화 m_HeroInfo.Initialize(); m_HeroInfo.Position_Damage = Obj_Damage_Position; m_HeroInfo.SetSkin(SetHeroAnimArmorSkinLevel(), SetHeroAnimSwordSkinLevel()); m_HeroInfo.PlayAnimation(eCharacterAnimState.Standing, true); // 보스 초기화 m_BossInfo.Initialize(BossID); switch (MainController.Instance.SelectStageKind) { case eStageKind.STAGE1: case eStageKind.STAGE2: case eStageKind.STAGE3: case eStageKind.STAGE4: StartCoroutine(StartCountDown()); break; case eStageKind.STAGE5: // 스토리 진행 때문에 별도로 진행 if (MainController.Instance.UserInfo.GetTutorialStoryClear(eStoryState.Stage5BossStageStory) == false) { TutorialStorySystem.Instance.StartSpeach(eStoryState.Stage5BossStageStory); } else { StartCoroutine(StartCountDown()); } break; } } }