}//조준점 근처 회로 인식 public void module_InOut(GameObject target) { Module_Lable ML = target.GetComponent <Module_Lable>(); Puzzle_Part_Hologram PPH = target.GetComponent <Puzzle_Part_Hologram>(); Tower_test TT = target.GetComponent <Tower_test>(); Data_Hologram DT = target.GetComponent <Data_Hologram>(); Machine_Effect ME = target.GetComponent <Machine_Effect>(); if (ML != null)//모듈 조준 { if (module_Buffer == 0 && ML.ModuleID % 100 != 0 && ML.Check_Module_Restrict(module_Buffer) == 1) { module_Buffer = ML.ModuleID % 100; ML.GetSignal(0); Gun_Module_script.GetSignal(module_Buffer); Connectec_Data_Obj = ML.Connected_Func_machine; // 머신 전용 ML.Connected_Func_machine = null; // 머신 전용 if (module_Buffer == 90) { aim_Mark_obj = Hologram_Marker[0]; } else if (module_Buffer == 91) { aim_Mark_obj = Hologram_Marker[1]; } previous_script_ML = ML; } else if (module_Buffer != 0 && ML.ModuleID % 100 == 0 && ML.Check_Module_Restrict(module_Buffer) == 1) { ML.Get_Machine_Signal(Connectec_Data_Obj); ML.GetSignal(module_Buffer); module_Buffer = 0; Connectec_Data_Obj = null; Gun_Module_script.GetSignal(module_Buffer); previous_script_ML = null; } else if (ML.Check_Module_Restrict(module_Buffer) == 2) { ML.Get_Restricted_Module_Signal(module_Buffer); module_Buffer = 0; Gun_Module_script.GetSignal(module_Buffer); previous_script_ML = null; } else if (ML.Check_Module_Restrict(module_Buffer) == 3) { module_Buffer = ML.ModuleID % 100; ML.Get_Restricted_Module_Signal(0); Gun_Module_script.GetSignal(module_Buffer); previous_script_ML = ML; } Debug.Log("From 'player_shot' GunBuffer : " + module_Buffer + " targetModule_Buffer : " + ML.ModuleID); }//모듈 조준 else if (PPH != null) { if (module_Buffer == 0 && PPH.hologram_Part_ID != 0 && PPH.module_Linked.GetComponent <Module_Lable>().Check_Module_Restrict(module_Buffer) != 0) { //Debug.Log("From 'player_shot' DisAssemble"); module_Buffer = PPH.Get_Disassemble_Signal(); previous_script_ML = PPH.module_Linked.GetComponent <Module_Lable>(); Gun_Module_script.GetSignal(module_Buffer); } //홀로그램 분해 } //퍼즐 홀로그램 조준 else if (TT != null && ME != null) { if (module_Buffer == 0) { //Debug.Log("From player_shot Get Cnn_machine"); if (TT.TowerFunc == Tower_test.TowerStyle.CNN) { module_Buffer = 90; aim_Mark_obj = Hologram_Marker[0]; } else if (TT.TowerFunc == Tower_test.TowerStyle.Electric) { module_Buffer = 91; aim_Mark_obj = Hologram_Marker[1]; } Connectec_Data_Obj = target; target.SendMessage("Get_Consume_Signal"); target.GetComponent <Machine_Effect>().Get_Signal(false); Gun_Module_script.GetSignal(module_Buffer); previous_script_ML = null; } }//인식기 조준 else if (DT != null && Test_DT_Identify) { if (module_Buffer == 0) { //Destroy(target); module_Buffer = DT.moduleID; Connectec_Data_Obj = target; target.SendMessage("Get_Consume_Signal"); Gun_Module_script.GetSignal(module_Buffer); } } }//데이터 전송 & 흡수
}//조준점 근처 회로 인식 public void module_InOut(GameObject target) { TransferableDataObject ML = target.GetComponent <TransferableDataObject>(); Puzzle_Part_Hologram PPH = target.GetComponent <Puzzle_Part_Hologram>(); MagneticMachine magneticMachine = target.GetComponent <MagneticMachine>(); HologramObject DT = target.GetComponent <HologramObject>(); Machine_Effect ME = target.GetComponent <Machine_Effect>(); if (ML != null)//모듈 조준 { if (module_Buffer == 0 && ML.ID % 100 != 0 && ML.IsTransferPossible) { module_Buffer = ML.ID % 100; ML.OnDataTransfer(0); Gun_Module_script.GetSignal(module_Buffer); Connectec_Data_Obj = ML.ConnectedMachine; // 머신 전용 ML.DetachConnectedMachine(); // 머신 전용 if (module_Buffer == 90) { aim_Mark_obj = Hologram_Marker[0]; } else if (module_Buffer == 91) { aim_Mark_obj = Hologram_Marker[1]; } previous_script_ML = ML; } else if (module_Buffer != 0 && ML.ID % 100 == 0 && ML.IsTransferPossible) { ML.OnMachineDataTransfer(Connectec_Data_Obj); ML.OnDataTransfer(module_Buffer); module_Buffer = 0; Connectec_Data_Obj = null; Gun_Module_script.GetSignal(module_Buffer); previous_script_ML = null; } }//모듈 조준 else if (PPH != null) { if (module_Buffer == 0 && PPH.hologram_Part_ID != 0 && PPH.module_Linked.GetComponent <TransferableDataObject>().IsTransferPossible) { //Debug.Log("From 'player_shot' DisAssemble"); module_Buffer = PPH.Get_Disassemble_Signal(); previous_script_ML = PPH.module_Linked.GetComponent <TransferableDataObject>(); Gun_Module_script.GetSignal(module_Buffer); } //홀로그램 분해 } //퍼즐 홀로그램 조준 else if (magneticMachine != null && ME != null) { if (module_Buffer == 0) { //Debug.Log("From player_shot Get Cnn_machine"); if (magneticMachine.TowerFunc == MagneticMachine.TowerStyle.CNN) { module_Buffer = 90; aim_Mark_obj = Hologram_Marker[0]; } else if (magneticMachine.TowerFunc == MagneticMachine.TowerStyle.Electric) { module_Buffer = 91; aim_Mark_obj = Hologram_Marker[1]; } Connectec_Data_Obj = magneticMachine; target.SendMessage("OnTransferToPlayer"); target.GetComponent <Machine_Effect>().Get_Signal(false); Gun_Module_script.GetSignal(module_Buffer); previous_script_ML = null; } }//인식기 조준 else if (DT != null && Test_DT_Identify) { if (module_Buffer == 0) { //Destroy(target); module_Buffer = DT.ID; Connectec_Data_Obj = magneticMachine; target.SendMessage("OnTransferToPlayer"); Gun_Module_script.GetSignal(module_Buffer); } } }//데이터 전송 & 흡수