protected override void Awake() { base.Awake(); GameManager.Instacne.m_Main.m_PlayerCharacter = this; m_Team = E_Team.RED; SetHand(); if (!m_FollowCamera) { m_FollowCamera = transform.Find("CamAxis/Cam Follow").GetComponent <CameraAuthoring>(); m_FollowCameraAxis = m_FollowCamera.transform.parent; } if (!m_FinishCamera) { m_FinishCamera = transform.Find("CamAxis/Cam Finish").GetComponent <CameraAuthoring>(); } SetComponent <PlayerMovementComponent>(this); PlayerCameraControlComponent CamRot = SetComponent <PlayerCameraControlComponent>(this); CamRot.m_AxisXInvers = GameManager.Instacne.m_Main.m_CameraAxisXInvers; SetComponent <PlayerDashComponent>(this); SetComponent <PlayerNormalAttackComponent>(this); SetComponent <PlayerSkillSwordAttackComponent>(this); SetComponent <PlayerSkillTwoHandSwordAttackComponent>(this); SetComponent <PlayerSkillHalberdAttackComponent>(this); SetComponent <PlayerSkillKatanaAttackComponent>(this); SetComponent <PlayerSkillFinishPunchComponent>(this); }
public void ChangeFocus(CameraAuthoring _Camera, float _BlendTime) { foreach (CameraAuthoring c in m_CameraDic.Values) { c.ResetPriority(); } m_BrainCamera.m_Brain.m_DefaultBlend.m_Time = _BlendTime; _Camera.m_VirtualCamera.Priority = 99; }
public void InsertCamera(int _Number, CameraAuthoring _Camera) { CameraAuthoring camera = null; if (m_CameraDic.TryGetValue(_Number, out camera)) { Debug.Log("Camera with the same number cannot be registered"); return; } m_CameraDic.Add(_Number, _Camera); }