static void Menu_CursorDimension_ScalTo384() { foreach (GameObject go in Selection.gameObjects) { CursorDimLocation cdl = go.GetComponent <CursorDimLocation>(); if (cdl != null) { cdl.Dimension *= 384F; } CusorDimEx_LanguageAutoSelect cde_las = go.GetComponent <CusorDimEx_LanguageAutoSelect>(); if (cde_las != null) { for (int i = 0; i != cde_las.Prefab_DimsByLangauge.Length; ++i) { cde_las.Prefab_DimsByLangauge[i] *= 384F; } } LocalPos_LanguageAutoSelect lp_las = go.GetComponent <LocalPos_LanguageAutoSelect>(); if (lp_las != null) { for (int i = 0; i != lp_las.LocalPosition.Length; ++i) { lp_las.LocalPosition[i] *= 384F; } } EditorUtility.SetDirty(go); } }
// Use this for initialization void OnEnable() { mCursorDim = GetComponent<CursorDimLocation>(); if (mCursorDim == null||Prefab_DimsByLangauge==null ||Prefab_DimsByLangauge.Length == 0) { Debug.LogError("CusorDimEx_LanguageAutoSelect���������Աδ��ֵ����."); Destroy(this); return; } GameMain.EvtLanguageChange += Handle_LanguageChanged; mCursorDim.Dimension = Prefab_DimsByLangauge[(int)GameMain.Singleton.BSSetting.LaguageUsing.Val]; }
// Use this for initialization void OnEnable() { mCursorDim = GetComponent <CursorDimLocation>(); if (mCursorDim == null || Prefab_DimsByLangauge == null || Prefab_DimsByLangauge.Length == 0) { Debug.LogError("CusorDimEx_LanguageAutoSelectÓïÑÔ×é¼þ³ÉԱδ¸³Öµ´íÎó."); Destroy(this); return; } GameMain.EvtLanguageChange += Handle_LanguageChanged; mCursorDim.Dimension = Prefab_DimsByLangauge[(int)GameMain.Singleton.BSSetting.LaguageUsing.Val]; }
public void UpdateCursor(CursorDimLocation dimLocal) { BackstageMain.Singleton.Cursor.transform.position = dimLocal.transform.position; BackstageMain.Singleton.Cursor.SetDimens(dimLocal.Dimension); }