public CutinObjectInfo(GameObject prefab_obj, Transform parent_transform, NewBattleSkillCutin owner_battle_skill_cutin) { m_OwnerNewBattleSkillCutin = owner_battle_skill_cutin; GameObject cutin_object = Instantiate(prefab_obj); cutin_object.transform.SetParent(parent_transform, false); cutin_object.SetActive(false); m_RootObject = cutin_object; m_BGTransform = cutin_object.transform.Find("BG"); m_BGImage = m_BGTransform.GetComponent <Image>(); m_BGChangeImage = m_BGTransform.Find("BGChange").GetComponent <Image>(); m_BGChangeImage.gameObject.SetActive(false); m_CharaTransform = cutin_object.transform.Find("Chara"); m_CharaImageControl = m_CharaTransform.transform.Find("Image").GetComponent <BattleCharaImageViewControl>(); m_CharaImage = m_CharaTransform.transform.Find("Image").GetComponent <Image>(); m_CharaShadowImage = m_CharaTransform.transform.Find("Shadow/ImageShadow").GetComponent <Image>(); }
public void OnClickSkillCutin() { #if BUILD_TYPE_DEBUG if (m_NewBattleSkillCutin == null) { GameObject skill_cutin_prefab = Resources.Load <GameObject>("Prefab/BattleScene/NewBattleSkillCutin"); if (skill_cutin_prefab != null) { GameObject skill_cutin_object = Instantiate(skill_cutin_prefab); if (skill_cutin_object != null) { m_NewBattleSkillCutin = skill_cutin_object.GetComponent <NewBattleSkillCutin>(); if (m_NewBattleSkillCutin != null) { skill_cutin_object.transform.SetParent(m_DebugPartyOffset.transform.parent, false); } else { Destroy(skill_cutin_object); } } } } if (m_NewBattleSkillCutin != null && m_CurrentCharaMaster != null) { int fix_id = (int)m_CurrentCharaMaster.fix_id; int img_2_offsetX = (int)(m_OffsetXArray[m_Index, (int)CurrentUVTarget] * 1000); int img_2_offsetY = (int)(m_OffsetYArray[m_Index, (int)CurrentUVTarget] * 1000); int img_2_tiling = (int)(m_TilingArray[m_Index, (int)CurrentUVTarget] * 1000); int size_width = m_CurrentCharaMaster.size_width; int size_height = m_CurrentCharaMaster.size_height; MasterDataDefineLabel.PivotType pivot_type = m_CurrentCharaMaster.pivot; int side_offset = m_CurrentCharaMaster.side_offset; m_NewBattleSkillCutin.debugSkillCutin(fix_id, img_2_tiling, img_2_offsetX, img_2_offsetY, size_width, size_height, pivot_type, side_offset); } #endif }