public override void Init() { base.Init(); Utils.GetPlayerEventManager(Player.Player1).StartListening(EPlayerEvent.OnDeath, OnPlayerDeath); Utils.GetPlayerEventManager(Player.Player2).StartListening(EPlayerEvent.OnDeath, OnPlayerDeath); m_GameFlowManager = GameManager.Instance.GetSubManager <GameFlowSubGameManager>(ESubManager.GameFlow); m_TimeManager = GameManager.Instance.GetSubManager <TimeScaleSubGameManager>(ESubManager.TimeScale); m_GameConfig = GameConfig.Instance; m_AttackConfig = AttackConfig.Instance; }
private void Awake() { m_HP = m_HealthConfig.m_MaxHP; m_StunInfoSC = new PlayerStunInfoSubComponent(this, m_InfoComponent, m_MovementComponent, m_Anim); m_ProximityGuardSubComponent = new PlayerProximityGuardSubComponent(this, m_MovementComponent, m_Anim); m_TimeScaleManager = GameManager.Instance.GetSubManager <TimeScaleSubGameManager>(ESubManager.TimeScale); m_FXManager = GameManager.Instance.GetSubManager <FXSubGameManager>(ESubManager.FX); m_AudioManager = GameManager.Instance.GetSubManager <AudioSubGameManager>(ESubManager.Audio); RegisterListeners(); }
private void Awake() { m_Animator = GetComponent <Animator>(); m_TimeScaleManager = GameManager.Instance.GetSubManager <TimeScaleSubGameManager>(ESubManager.TimeScale); m_FXManager = GameManager.Instance.GetSubManager <FXSubGameManager>(ESubManager.FX); m_AudioManager = GameManager.Instance.GetSubManager <AudioSubGameManager>(ESubManager.Audio); m_UIBackground = GameObject.FindGameObjectWithTag("UIBackground")?.GetComponent <SpriteRenderer>(); m_UIMaskedBackground = GameObject.FindGameObjectWithTag("UIMaskedBackground")?.GetComponent <SpriteRenderer>(); m_UIBackgroundMask = GameObject.FindGameObjectWithTag("UIBackgroundMask")?.GetComponent <SpriteMask>(); m_UIBackgroundMaskDetail = GameObject.FindGameObjectWithTag("UIBackgroundMaskDetail")?.GetComponent <SpriteRenderer>(); #if UNITY_EDITOR if (m_UIBackground == null || m_UIMaskedBackground == null || m_UIBackgroundMask == null) { KakutoDebug.LogError("UIBackground elements can't be found"); } #endif }
public PlayerParryAttackLogic(PlayerParryAttackConfig config) { m_Config = config; m_TimeScaleManager = GameManager.Instance.GetSubManager <TimeScaleSubGameManager>(ESubManager.TimeScale); }