91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 23.6MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-03
  • 語言: 其他
  • 標簽:

資源簡介

類似于網絡游戲的商品切換滾動條,皮膚切換滾動條,自動居中離中心最近的Item,居中Item進行縮放,明暗變化。

資源截圖

代碼片段和文件信息

/******************************************************
*?滾動條擴展腳本?
*?Author:?liaoweiyu
*?function:自動居中最靠近中心的Item
???????????支持居中Item縮放
???????????支持非居中Item變暗
???????????支持點擊Item居中
???????????帶有居中Item改變時回調委托:_centerChanged
******************************************************/


using?UnityEngine;
using?UnityEngine.UI;
using?UnityEngine.EventSystems;
using?System.Collections;
using?System.Collections.Generic;
using?System;
#if?UNITY_EDITOR
using?UnityEditor;
using?UnityEditorInternal;
#endif
public?enum?ScrollDir_UGUI
{
????Horizontal
????Vertical
}
public?enum?ImageType_UGUI
{
????Image
}
///?
///?用于顯示在Inspector的類
///?

[Serializable]
public?class?ScrollViewImage
{
????public?ImageType_UGUI?type;
????public?Image?image;
}
#if?UNITY_EDITOR
///?
///?重繪Inspector類
///?

[CustomEditor(typeof(CenterOnChild_UGUI))]
public?class?OverDrawInspector?:?Editor
{
????private?Serializedobject?serial;//序列化
????private?ReorderableList?list;//數組

????private?SerializedProperty?TransformSpeed?ScaleSpeed?OpacitySpeed?CenterChildScale?AddMask?MaskOpacity;
????///?
????///?初始化
????///?

????void?OnEnable()
????{
????????serial?=?new?Serializedobject(target);
????????list?=?new?ReorderableList(serial?serial.FindProperty(“ChildMasks“)?true?true?true?true);
????????TransformSpeed?=?serial.FindProperty(“TransformSpeed“);
????????ScaleSpeed?=?serial.FindProperty(“ScaleSpeed“);
????????OpacitySpeed?=?serial.FindProperty(“OpacitySpeed“);
????????CenterChildScale?=?serial.FindProperty(“CenterChildScale“);
????????AddMask?=?serial.FindProperty(“AddMask“);
????????MaskOpacity?=?serial.FindProperty(“MaskOpacity“);

????????//繪制List標題
????????list.drawHeaderCallback?=?(Rect?rect)?=>
????????{
????????????EditorGUI.LabelField(rect?“MaskList“);
????????};
????????//繪制List
????????list.drawElementCallback?=
????????(Rect?rect?int?index?bool?isActive?bool?isFocused)?=>
????????{???????
????????????var?element?=?list.serializedProperty.GetArrayElementAtIndex(index);
????????????rect.y?+=?2;
????????????//繪制一個單元
????????????EditorGUI.PropertyField(new?Rect(rect.x?rect.y?60?EditorGUIUtility.singleLineHeight)
????????????element.FindPropertyRelative(“type“)?GUIContent.none);
????????????EditorGUI.PropertyField(new?Rect(rect.x?+?60?rect.y?rect.width?-?60?-?30?EditorGUIUtility.singleLineHeight)
????????????element.FindPropertyRelative(“image“)?GUIContent.none);
????????};
????}
????///?
????///?重繪
????///?

????public?override?void?OnInspectorGUI()
????{
????????serial.Update();
????????EditorGUILayout.PropertyField(TransformSpeed);
????????EditorGUILayout.PropertyField(ScaleSpeed);
????????EditorGUILayout.PropertyField(CenterChildScale);
????????EditorGUILayout.PropertyField(AddMask);
????????if?(AddMask.boolValue?==?true)
????????{
????????????EditorGUILayout.PropertyField(OpacitySpeed);
??????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????19649??2018-02-11?17:17??CenterOnChild_UGUI.cs
?????文件??????268285??2018-02-11?17:27??動態滾動條使用說明.docx
?????目錄???????????0??2018-02-11?17:34??工程文件\
?????目錄???????????0??2018-02-11?17:34??工程文件\SrollViewUGUI\
?????目錄???????????0??2018-02-11?17:34??工程文件\SrollViewUGUI\Assets\
?????目錄???????????0??2018-02-11?17:34??工程文件\SrollViewUGUI\Assets\Prefab\
?????文件???????81702??2018-02-11?17:18??工程文件\SrollViewUGUI\Assets\Prefab\UGUI_Store.prefab
?????文件?????????209??2018-02-11?17:18??工程文件\SrollViewUGUI\Assets\Prefab\UGUI_Store.prefab.meta
?????文件?????????191??2018-02-11?17:18??工程文件\SrollViewUGUI\Assets\Prefab.meta
?????目錄???????????0??2018-02-11?17:34??工程文件\SrollViewUGUI\Assets\scripts\
?????文件???????19649??2018-02-11?17:17??工程文件\SrollViewUGUI\Assets\scripts\CenterOnChild_UGUI.cs
?????文件?????????262??2018-02-11?13:59??工程文件\SrollViewUGUI\Assets\scripts\CenterOnChild_UGUI.cs.meta
?????文件?????????302??2018-02-11?17:00??工程文件\SrollViewUGUI\Assets\scripts\GoodClass.cs
?????文件?????????262??2018-02-11?16:58??工程文件\SrollViewUGUI\Assets\scripts\GoodClass.cs.meta
?????文件?????????640??2018-02-11?14:55??工程文件\SrollViewUGUI\Assets\scripts\UGUI_Item.cs
?????文件?????????262??2018-02-11?14:45??工程文件\SrollViewUGUI\Assets\scripts\UGUI_Item.cs.meta
?????文件????????1886??2018-02-11?17:04??工程文件\SrollViewUGUI\Assets\scripts\UGUI_Store.cs
?????文件?????????262??2018-02-11?14:51??工程文件\SrollViewUGUI\Assets\scripts\UGUI_Store.cs.meta
?????文件?????????191??2018-02-11?13:58??工程文件\SrollViewUGUI\Assets\scripts.meta
?????文件???????17367??2018-02-11?17:29??工程文件\SrollViewUGUI\Assets\ScrollViewScene.unity
?????文件?????????174??2018-02-11?17:29??工程文件\SrollViewUGUI\Assets\ScrollViewScene.unity.meta
?????目錄???????????0??2018-02-11?17:34??工程文件\SrollViewUGUI\Assets\Sprites\
?????文件??????382106??2018-02-11?14:06??工程文件\SrollViewUGUI\Assets\Sprites\StoreBg.png
?????文件????????2007??2018-02-11?14:06??工程文件\SrollViewUGUI\Assets\Sprites\StoreBg.png.meta
?????文件??????144734??2018-02-11?14:17??工程文件\SrollViewUGUI\Assets\Sprites\apple.png
?????文件????????2007??2018-02-11?14:18??工程文件\SrollViewUGUI\Assets\Sprites\apple.png.meta
?????文件??????160741??2018-02-11?14:42??工程文件\SrollViewUGUI\Assets\Sprites\close.png
?????文件????????2007??2018-02-11?14:42??工程文件\SrollViewUGUI\Assets\Sprites\close.png.meta
?????文件??????127833??2018-02-11?14:31??工程文件\SrollViewUGUI\Assets\Sprites\cyj.png
?????文件????????2007??2018-02-11?14:31??工程文件\SrollViewUGUI\Assets\Sprites\cyj.png.meta
?????文件??????216957??2018-02-11?14:26??工程文件\SrollViewUGUI\Assets\Sprites\彼岸花.png
............此處省略1171個文件信息

評論

共有 條評論

相關資源