private void InitializeHandlers() { Handler_Animation = new AnimationHandler(m_handlerDataGroup, GetComponent <Animator>()); Handler_Movement = new MovementHandler(m_handlerDataGroup, GetComponent <CharacterController>(), GetComponent <Transform>(), m_globalConfig); Handler_Input = new InputHandler(m_handlerDataGroup); Handler_Collision = new CollisionHandler(m_handlerDataGroup, GetComponentInChildren <OTGHitColliderController>(), GetComponentsInChildren <OTGHurtColliderController>(), GetComponentInChildren <OTGTargetingController>(), m_globalConfig); Handler_Combat = new CombatHandler(m_handlerDataGroup); Handler_VFX = new VFXHandler(GetComponentsInChildren <OTGVFXController>()); Handler_SFX = new SFXHandler(m_globalConfig.SoundHandleData, GetComponentsInChildren <OTGSoundFXController>()); }
private void CleanupHandlers() { Handler_Animation.CleanupHandler(); Handler_Animation = null; Handler_Movement.CleanupHandler(); Handler_Movement = null; Handler_Input.CleanupHandler(); Handler_Input = null; Handler_Collision.CleanupHandler(); Handler_Collision = null; Handler_Combat.CleanupHandler(); Handler_Combat = null; Handler_VFX.CleanupHandler(); Handler_VFX = null; Handler_SFX.CleanupHandler(); Handler_SFX = null; }