private void PlayerUI() { try { UIPlayer.ProfileImage(playerFSMMgr.isNormal); HPChangeEffect(playerFSMMgr.Stat, UIPlayer.hpBar); UIPlayer.HPValueText(); UIPlayer.SpecialGauge(); UIPlayer.DashSetActive(); UIPlayer.Skill4SetActive(!playerFSMMgr.isNormal && playerFSMMgr.isCanUltimate); CanvasInfo.Instance.enemyHP.HpBarView(); if (MissionManager.Instance.CurrentMissionType == MissionType.Tutorial) { MissionTutorial tuto = MissionManager.Instance.CurrentMission as MissionTutorial; if (tuto.skill1 && !tuto.skill2 && !tuto.skill3) { UIPlayer.SkillSetActive(0, playerFSMMgr.Skill1CTime, playerFSMMgr.isSkill1CTime); uiPlayer.SkillLock(1); uiPlayer.SkillLock(2); } else if (tuto.skill2 && !tuto.skill3) { UIPlayer.SkillSetActive(0, playerFSMMgr.Skill1CTime, playerFSMMgr.isSkill1CTime); UIPlayer.SkillSetActive(1, playerFSMMgr.Skill2CTime, playerFSMMgr.isSkill2CTime); uiPlayer.SkillLock(2); } else if (tuto.skill3) { UIPlayer.SkillSetActive(0, playerFSMMgr.Skill1CTime, playerFSMMgr.isSkill1CTime); UIPlayer.SkillSetActive(1, playerFSMMgr.Skill2CTime, playerFSMMgr.isSkill2CTime); UIPlayer.SkillSetActive(2, playerFSMMgr.Skill3CTime, playerFSMMgr.isSkill3CTime); } else { uiPlayer.SkillLock(1); uiPlayer.SkillLock(0); uiPlayer.SkillLock(2); } } else { UIPlayer.SkillSetActive(0, playerFSMMgr.Skill1CTime, playerFSMMgr.isSkill1CTime); UIPlayer.SkillSetActive(1, playerFSMMgr.Skill2CTime, playerFSMMgr.isSkill2CTime); UIPlayer.SkillSetActive(2, playerFSMMgr.Skill3CTime, playerFSMMgr.isSkill3CTime); } //if (playerFSMMgr.isSkill4CTime) UIPlayer.SkillSetActive(3, playerFSMMgr.Skill4CTime); } catch { SetValue(); } }
protected override void Awake() { base.Awake(); SetGizmoColor(Color.red); _cc = GetComponentInChildren <CapsuleCollider>(); _stat = GetComponent <PlayerStat>(); _anim = GetComponentInChildren <Animator>(); _Sound = GetComponent <PlayerSound>(); rigid = GetComponent <Rigidbody>(); CMvcam2 = GameObject.Find("CMvcam2").GetComponent <Cinemachine.CinemachineVirtualCamera>(); vignette = GameObject.Find("mainCam").GetComponent <PostProcessVolume>().profile.GetSetting <Vignette>(); colorGrading = GameObject.Find("mainCam").GetComponent <PostProcessVolume>().profile.GetSetting <ColorGrading>(); bloom = GameObject.Find("mainCam").GetComponent <PostProcessVolume>().profile.GetSetting <Bloom>(); Attack_Capsule = GameObject.FindGameObjectWithTag("Weapon").GetComponent <CapsuleCollider>(); Skill3_Capsule = Skill3_Start.GetComponent <CapsuleCollider>(); enemyHPBar = GameObject.Find("EnemyHPBar").GetComponent <EnemyHPBar>(); Skill1Shoots.gameObject.SetActive(false); instance = this; isSkill2 = false; isInputLock = false; isSpecial = false; isMouseYLock = false; try { Skill3_Start.SetActive(false); Skill3_End.SetActive(false); } catch { } randomShoot = new int[5]; PlayerState[] stateValues = (PlayerState[])System.Enum.GetValues(typeof(PlayerState)); foreach (PlayerState s in stateValues) { System.Type FSMType = System.Type.GetType("Player" + s.ToString()); FSMState state = (FSMState)GetComponent(FSMType); if (null == state) { state = (FSMState)gameObject.AddComponent(FSMType); } _states.Add(s, state); state.enabled = false; } for (int x = 0; x < _MR.Length; x++) { materialList.AddRange(_MR[x].materials); } remainingDash = 3; try { mission = GameObject.Find("Tutorial").GetComponent <MissionTutorial>(); } catch { mission = null; } }