void OnDestroy() { m_CardStatusCheckWorker = null; m_CardSlotWorker = null; m_RuleCheckWorker = null; m_SkillCardWorker = null; m_UIControlWorker = null; }
void Awake() { Debug.Assert(m_PlayerSideCardSettingList.Count <= ConstantDefine.MAX_CARD_DECK_COUNT, "List Size Should be Under 6."); Debug.Assert(m_EnemySideCardSettingList.Count <= ConstantDefine.MAX_CARD_DECK_COUNT, "List Size Should be Under 6."); m_CardStatusCheckWorker = gameObject.AddComponent <CardStatusCheckWorker>(); m_CardSlotWorker = gameObject.AddComponent <CardSlotWorker>(); m_RuleCheckWorker = gameObject.AddComponent <RuleCheckWorker>(); m_SkillCardWorker = gameObject.AddComponent <SkillCardWorker>(); m_UIControlWorker = gameObject.AddComponent <UIControlWorker>(); InitCards(); InitCardSlotWorker(); InitRuleCheckWorker(); InitCardStatusCheckWorker(); InitUIControlWorker(); }