wangguan
2020-11-18 056fe553764f4be5ea46f25b447d60042cae817b
修改新手指导适配
5 files modified
102 ■■■■■ changed files
Assets/Prefabs/UI/Endless/BottomCanvas.prefab 20 ●●●● patch | view | raw | blame | history
Assets/Prefabs/UI/EndlessTileGridBuyBtn.prefab 2 ●●● patch | view | raw | blame | history
Assets/Resources/UI/Guide/GuidePanel.prefab 22 ●●●● patch | view | raw | blame | history
Assets/Scenes/Levels/Battle/Endless2D.unity 37 ●●●●● patch | view | raw | blame | history
Assets/Scripts/Guide/GuidePanel.cs 21 ●●●● patch | view | raw | blame | history
Assets/Prefabs/UI/Endless/BottomCanvas.prefab
@@ -318,8 +318,8 @@
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0, y: 0.5}
  m_AnchorMax: {x: 0, y: 0.5}
  m_AnchoredPosition: {x: 177, y: 21}
  m_SizeDelta: {x: 200, y: 65}
  m_AnchoredPosition: {x: 136.13, y: 0}
  m_SizeDelta: {x: 118.25601, y: 92.502655}
  m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4623057511285327657
CanvasRenderer:
@@ -349,7 +349,7 @@
  m_OnCullStateChanged:
    m_PersistentCalls:
      m_Calls: []
  m_text: 100
  m_text: 99999
  m_isRightToLeft: 0
  m_fontAsset: {fileID: 11400000, guid: 572adb1c73f88e441a1bf998ca9f4ea5, type: 2}
  m_sharedMaterial: {fileID: -3548855653558765056, guid: 572adb1c73f88e441a1bf998ca9f4ea5,
@@ -377,15 +377,15 @@
  m_faceColor:
    serializedVersion: 2
    rgba: 4294967295
  m_fontSize: 36
  m_fontSizeBase: 36
  m_fontSize: 28
  m_fontSizeBase: 28
  m_fontWeight: 400
  m_enableAutoSizing: 0
  m_fontSizeMin: 18
  m_fontSizeMax: 72
  m_fontStyle: 1
  m_HorizontalAlignment: 1
  m_VerticalAlignment: 512
  m_VerticalAlignment: 256
  m_textAlignment: 65535
  m_characterSpacing: 0
  m_wordSpacing: 0
@@ -413,7 +413,7 @@
  m_VertexBufferAutoSizeReduction: 1
  m_useMaxVisibleDescender: 1
  m_pageToDisplay: 1
  m_margin: {x: 0, y: 0, z: 59.522808, w: 22.461264}
  m_margin: {x: 0, y: 0, z: 0.6976433, w: 0.30635062}
  m_isUsingLegacyAnimationComponent: 0
  m_isVolumetricText: 0
  m_hasFontAssetChanged: 0
@@ -4741,9 +4741,9 @@
  m_Father: {fileID: 2459412157512953547}
  m_RootOrder: 3
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0.5, y: 0}
  m_AnchorMax: {x: 0.5, y: 0}
  m_AnchoredPosition: {x: -419, y: 119}
  m_AnchorMin: {x: 0, y: 0}
  m_AnchorMax: {x: 0, y: 0}
  m_AnchoredPosition: {x: 121, y: 119}
  m_SizeDelta: {x: 180, y: 40}
  m_Pivot: {x: 0.5, y: 1}
--- !u!222 &4623057513073301100
Assets/Prefabs/UI/EndlessTileGridBuyBtn.prefab
@@ -286,7 +286,7 @@
  m_Name: 
  m_EditorClassIdentifier: 
  m_Material: {fileID: 0}
  m_Color: {r: 1, g: 1, b: 1, a: 1}
  m_Color: {r: 1, g: 1, b: 1, a: 0}
  m_RaycastTarget: 1
  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
  m_Maskable: 1
Assets/Resources/UI/Guide/GuidePanel.prefab
@@ -163,8 +163,8 @@
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0.5, y: 0.5}
  m_AnchorMax: {x: 0.5, y: 0.5}
  m_AnchoredPosition: {x: -156, y: -97}
  m_SizeDelta: {x: 150, y: 160}
  m_AnchoredPosition: {x: -156, y: -124}
  m_SizeDelta: {x: 120, y: 130}
  m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1513328901255623773
CanvasRenderer:
@@ -10128,8 +10128,8 @@
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0.5, y: 0.5}
  m_AnchorMax: {x: 0.5, y: 0.5}
  m_AnchoredPosition: {x: 6, y: -108}
  m_SizeDelta: {x: 150, y: 160}
  m_AnchoredPosition: {x: 6, y: -124}
  m_SizeDelta: {x: 120, y: 130}
  m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1008060919980179297
CanvasRenderer:
@@ -10434,7 +10434,7 @@
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 4033919787940865614}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalPosition: {x: 0, y: 0, z: -0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 7678627218380787076}
@@ -10444,7 +10444,7 @@
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0.5, y: 0.5}
  m_AnchorMax: {x: 0.5, y: 0.5}
  m_AnchoredPosition: {x: -302, y: -549.5}
  m_AnchoredPosition: {x: -345, y: -451}
  m_SizeDelta: {x: 135, y: 135}
  m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &40450391755731747
@@ -10775,7 +10775,7 @@
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0.5, y: 0.5}
  m_AnchorMax: {x: 0.5, y: 0.5}
  m_AnchoredPosition: {x: 302, y: -549.5}
  m_AnchoredPosition: {x: 347, y: -438}
  m_SizeDelta: {x: 135, y: 135}
  m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5571260166908534693
@@ -10932,7 +10932,7 @@
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 6276095933853610772}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalPosition: {x: 0, y: 0, z: -0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 5966368840673147708}
@@ -10941,7 +10941,7 @@
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0.5, y: 0.5}
  m_AnchorMax: {x: 0.5, y: 0.5}
  m_AnchoredPosition: {x: 0, y: -701}
  m_AnchoredPosition: {x: 0, y: -604}
  m_SizeDelta: {x: 135, y: 135}
  m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4760460880310566967
@@ -16751,7 +16751,7 @@
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 8950312693980221416}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalPosition: {x: 0, y: 0, z: -0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 3078043526367245840}
@@ -16760,7 +16760,7 @@
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  m_AnchorMin: {x: 0.5, y: 0.5}
  m_AnchorMax: {x: 0.5, y: 0.5}
  m_AnchoredPosition: {x: -302, y: -701}
  m_AnchoredPosition: {x: -356, y: -600}
  m_SizeDelta: {x: 135, y: 135}
  m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4223709936664550011
Assets/Scenes/Levels/Battle/Endless2D.unity
@@ -4072,45 +4072,10 @@
  m_Modification:
    m_TransformParent: {fileID: 1340671931}
    m_Modifications:
    - target: {fileID: 4623057511285327670, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_margin.w
      value: -2.4372947
      objectReference: {fileID: 0}
    - target: {fileID: 4623057511285327670, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_margin.y
      value: 7.656536
      objectReference: {fileID: 0}
    - target: {fileID: 4623057511285327670, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_margin.z
      value: 3.4907608
      objectReference: {fileID: 0}
    - target: {fileID: 4623057511285327671, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_AnchoredPosition.x
      value: 133.9
      objectReference: {fileID: 0}
    - target: {fileID: 4623057511285327671, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_SizeDelta.x
      value: 118.541504
      objectReference: {fileID: 0}
    - target: {fileID: 4623057511285327671, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_LocalPosition.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 4623057511285327671, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_AnchoredPosition.y
      value: 20.4
      objectReference: {fileID: 0}
    - target: {fileID: 4623057512524248738, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
      propertyPath: m_AnchoredPosition.y
      value: -0.000061035156
      value: -0.000091552734
      objectReference: {fileID: 0}
    - target: {fileID: 4623057512704841786, guid: 29da21b318f42054db30c52123aa4dbf,
        type: 3}
Assets/Scripts/Guide/GuidePanel.cs
@@ -69,11 +69,9 @@
        towerBuyBtn = GameObject.Find("UICamera/BottomCanvas/Panel/TowerBuyBtn");
        RectTransform tmpTs = towerBuyBtn.GetComponent<RectTransform>();
        float tmpOffect = tmpTs.anchoredPosition.y - (transform.parent.parent.GetComponent<RectTransform>().sizeDelta.y * 0.5f);
        RectTransform canvasUI = transform.parent.parent.GetComponent<RectTransform>();
        float tmpOffect = tmpTs.anchoredPosition.y - (canvasUI.sizeDelta.y * 0.5f);
        towerBuyBtnPos = new Vector2(215, tmpOffect);
        //towerBuyBtnPos = new Vector2(215, -862);
        Debug.Log(tmpOffect);
        tipsUI = transform.Find("Tips").gameObject;
        tipsUI.transform.SetAsLastSibling();//把tips放在最下面
@@ -97,29 +95,44 @@
        particle_1 = image_Rim_Rect.transform.Find("Particle System Small").gameObject;
        particle_2 = image_Rim_Rect.transform.Find("Particle System Big").gameObject;
        float a = 0.06666667f;
        float b = canvasUI.localScale.x;
        float tmpScale = a / b;
        //Debug.Log($"记录的比值:{a}   当前Canvas的Scale:{b}  计算得到的比值:{tmpScale}");
        image_Tip_Rect = transform.Find("Image_Tip").GetComponent<RectTransform>();
        text_Tip = image_Tip_Rect.transform.Find("Text").GetComponent<Text>();
        image_SkillRim = transform.Find("Image_SkillRim").GetComponent<Image>();
        image_SkillRim.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
        SetRimActive(false);
        image_SkillRim.gameObject.SetActive(false);
        fire1 = transform.Find("Image_Fire1").GetComponent<ImageFire1>();
        fire1.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
        fire2 = transform.Find("Image_Fire2").GetComponent<ImageFire2>();
        fire2.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
        fire1.gameObject.SetActive(false);
        fire2.gameObject.SetActive(false);
        towerPos = transform.Find("Image_TowerPos").GetComponent<ImageTowerPos>();
        towerPos.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
        towerPos.enabled = false;
        towerPos2 = transform.Find("Image_TowerPos2").GetComponent<ImageTowerPos2>();
        towerPos2.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
        towerPos2.enabled = false;
        water1 = transform.Find("Image_Water").GetComponent<ImageWater>();
        water1.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
        water1.gameObject.SetActive(false);
        skill = transform.Find("Image_Skill").GetComponent<ImageSkill>();
        skill.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
        skill.gameObject.SetActive(false);
        dragHandImg = transform.Find("ImageHand").GetComponent<RectTransform>();