void Start() { instance = this; anim = GetComponent <Animator>(); shieldOpen = Animator.StringToHash("shieldOpen"); _audio = GetComponent <AudioSource>(); }
// 이곳에는 변수를 얻어오는 로직만 짤것 public void _OnStart() { m_mainCameraCtrl = GameObject.FindGameObjectWithTag("MainCamera")?.GetComponent <MainCameraCtrl>(); m_enemyCntCtrl = GameObject.FindGameObjectWithTag("ENEMY_CNT")?.GetComponent <EnemyCntCtrl>(); m_planetHpCtrl = GameObject.FindGameObjectWithTag("PLANET_HP")?.GetComponent <PlanetHPCtrl>(); m_resourceCtrl = GameObject.FindGameObjectWithTag("RESOURCE")?.GetComponent <ResourceCtrl>(); m_miniPlanetCtrl = GameObject.FindGameObjectWithTag("MINIPLANET")?.GetComponent <MiniPlanetCtrl>(); m_shieldCtrl = GameObject.Find("Shield")?.GetComponent <ShieldCtrl>(); m_toLobbyPopUpPanel = GameObject.Find("ToLobbyPopUpPanel"); m_turretDropPopUpCtrl = GameObject.Find("TurretDropPopUpPanel").GetComponent <TurretDropPopUpCtrl>(); m_spcDropPopUpCtrl = GameObject.Find("SpcDropPopUpPanel").GetComponent <SpcDropPopUpPanelCtrl>(); m_laboratoryPopUp = GameObject.FindGameObjectWithTag("LABORATORY_POPUP"); m_buildPopUp = GameObject.FindGameObjectWithTag("BUILD_POPUP"); m_labScroll = GameObject.Find("LabScroll"); m_repairScroll = GameObject.Find("RepairScroll"); m_buildScroll = GameObject.Find("BuildScroll"); m_rightArrow = GameObject.Find("RightArrow"); m_leftArrow = GameObject.Find("LeftArrow"); m_ButtonLabFake = GameObject.Find("Button_Lab_fake"); m_ButtonRepairFake = GameObject.Find("Button_Repair_fake"); m_ButtonBuildFake = GameObject.Find("Button_Build_fake"); m_LabButtons = GameObject.FindGameObjectsWithTag("LABBUTTON"); m_LabButtons_Black = GameObject.FindGameObjectsWithTag("LABBUTTON_BLACK"); m_LabInfoScrolls = GameObject.FindGameObjectsWithTag("LABINFO"); m_LabImages_Black = GameObject.FindGameObjectsWithTag("LABIMAGE_BLACK"); m_LabStartButtons = GameObject.FindGameObjectsWithTag("LABSTARTBUTTON"); m_LabWarningNoBP = GameObject.Find("LabWarningNoBP"); m_LabWarningMax = GameObject.Find("LabWarningMax"); m_LabWarningNoRsrc = GameObject.Find("LabWarningNoRsrc"); m_RepairButtons = GameObject.FindGameObjectsWithTag("REPAIRBUTTON"); m_RepairButtons_Black = GameObject.FindGameObjectsWithTag("REPAIRBUTTON_BLACK"); m_RepairInfoScrolls = GameObject.FindGameObjectsWithTag("REPAIRINFO"); m_RepairImages_Black = GameObject.FindGameObjectsWithTag("REPAIRIMAGE_BLACK"); m_RepairStartButtons = GameObject.FindGameObjectsWithTag("REPAIRSTARTBUTTON"); //추가 m_RepairWarningNoBP = GameObject.Find("RepairWarningNoBP"); m_RepairWarningAlready = GameObject.Find("RepairWarningAlready"); m_LaunchWarningNotRepaired = GameObject.Find("LaunchWarningNotRepaired"); m_LaunchWarning = GameObject.Find("LaunchWarningPanel"); m_BuildButtons = GameObject.FindGameObjectsWithTag("BUILDBUTTON"); m_BuildButtons_Black = GameObject.FindGameObjectsWithTag("BUILDBUTTON_BLACK"); m_BuildInfoScrolls = GameObject.FindGameObjectsWithTag("BUILDINFO"); m_BuildImages_Black = GameObject.FindGameObjectsWithTag("BUILDIMAGE_BLACK"); m_BuildStartButtons = GameObject.FindGameObjectsWithTag("BUILDSTARTBUTTON"); m_BuildWarningNoBP = GameObject.Find("BuildWarningNoBP"); m_BuildWarningAlready = GameObject.Find("BuildWarningAlready"); m_BuildWarningDoubleShield = GameObject.Find("BuildWarningDoubleShield"); m_BuildWarningNoRsrc = GameObject.Find("BuildWarningNoRsrc"); m_RemoveInfoScroll = GameObject.FindGameObjectWithTag("REMOVEINFO"); m_RemoveWarningYet = GameObject.Find("RemoveWarningYet"); m_RemoveWarning = GameObject.Find("RemoveWarningPanel"); m_TurretSupports = GameObject.FindGameObjectsWithTag("TURRET_SUPPORT"); m_fastButton = GameObject.Find("FastButton"); m_brokenSpaceShip = GameObject.Find("BrokenSpaceShip"); }