Commit 0faf3ff1 authored by Ever's avatar Ever

更新代码

parent 2d6afbcd
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
[CustomEditor(typeof(ExText))]
public class ExTextEditor : Editor
{
public override void OnInspectorGUI()
{
ExText t = target as ExText;
t.isUseActive = EditorGUILayout.Toggle("ǷӦ", t.isUseActive);
base.OnInspectorGUI();
}
}
...@@ -119,6 +119,32 @@ TextureImporter: ...@@ -119,6 +119,32 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: [] sprites: []
......
...@@ -119,6 +119,32 @@ TextureImporter: ...@@ -119,6 +119,32 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: [] sprites: []
......
...@@ -12,43 +12,15 @@ public class GameMgr : MonoBehaviour ...@@ -12,43 +12,15 @@ public class GameMgr : MonoBehaviour
get { return ins; } get { return ins; }
} }
private void Start()
{
ins = this;
}
public MainData md; public MainData md;
public MaskItemMgr miMgr;
public TextItemMgr tiMgr;
public void Init(Texture2D _png, Sprite _jpg, ResJsonData _json) public void Init(Texture2D _png, Sprite _jpg, ResJsonData _json)
{ {
ins = this;
md.Init(_png, _jpg, _json); md.Init(_png, _jpg, _json);
} }
public List<MaskItem> useList = new List<MaskItem>();
public List<MaskItem> poolList = new List<MaskItem>();
public MaskItem item;
public MaskItem Get()
{
if (poolList.Count == 0)
{
MaskItem temp = GameObject.Instantiate<MaskItem>(item, item.transform.parent);
poolList.Add(temp);
}
MaskItem ret = poolList[0];
poolList.RemoveAt(0);
useList.Add(ret);
return ret;
}
public void Circle(MaskItem temp)
{
if (useList.Contains(temp))
{
useList.Remove(temp);
poolList.Add(temp);
}
}
public void Create(MainData md, ExRoomDatas erd, Vector3 v)
{
MaskItem temp = Get();
temp.FunDo(md, erd, v);
}
} }
...@@ -10,10 +10,10 @@ using UnityEngine.UI; ...@@ -10,10 +10,10 @@ using UnityEngine.UI;
public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDragHandler public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDragHandler
{ {
public ExRoomDatas erd;
public static int gunSize = 50; public static int gunSize = 50;
public static Vector4 config = new Vector4(0, -100, 725f, 725f);
public ExRoomDatas erd;
public Texture2D png = null; public Texture2D png = null;
public Sprite jpg = null; public Sprite jpg = null;
public ResJsonData json; public ResJsonData json;
...@@ -38,37 +38,17 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag ...@@ -38,37 +38,17 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag
imgpng.GetComponent<RectTransform>().sizeDelta = new Vector2(png.width, png.height); imgpng.GetComponent<RectTransform>().sizeDelta = new Vector2(png.width, png.height);
imgjpg.sprite = jpg; imgjpg.sprite = jpg;
imgjpg.GetComponent<RectTransform>().sizeDelta = new Vector2(png.width, png.height); imgjpg.GetComponent<RectTransform>().sizeDelta = new Vector2(png.width, png.height);
GoOn();
}
private void TestColor() float w = config.z / png.width;
{ float h = config.w / png.height;
for (int i = 0; i < json.roomDatas.Count; i++) float s = Math.Min(w, h);
{ transform.parent.localScale = Vector3.one * s;
RoomDatas rd = json.roomDatas[i]; transform.parent.localPosition = new Vector3(config.x, config.y, 0);
Vector2 v = new Vector2(rd.px, rd.py);
FunDo(v);
}
}
public void GoOn()
{
List<int> list = json.list;
for (int i = 0; i < list.Count; i++) GameMgr.Ins.tiMgr.Init(json,png);
{ GameMgr.Ins.tiMgr.SizeChange(s);
int id = list[i]; EventDispatcher.Dispatch(EventName.Event.Event_GroupListCreate, json.roomGroupsData);
for (int j = 0; j < json.roomDatas.Count; j++)
{
RoomDatas rd = json.roomDatas[j];
if (rd.id == id)
{
OnClickPixel(rd.px, rd.py);
}
} }
}
}
#region 拖拽 #region 拖拽
private bool isDrag = false; private bool isDrag = false;
...@@ -107,22 +87,23 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag ...@@ -107,22 +87,23 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag
if (Vector2.Distance(Pos_1, Pos_2) < Vector2.Distance(n_Pos_1, n_Pos_2)) if (Vector2.Distance(Pos_1, Pos_2) < Vector2.Distance(n_Pos_1, n_Pos_2))
{ {
transform.parent.parent.localScale += Vector3.one * 0.25f; transform.parent.localScale += Vector3.one * 0.25f;
if (transform.parent.parent.localScale.x > 4) if (transform.parent.localScale.x > 4)
{ {
transform.parent.parent.localScale = Vector3.one * 4; transform.parent.localScale = Vector3.one * 4;
} }
} }
else else
{ {
transform.parent.parent.localScale -= Vector3.one * 0.25f; transform.parent.localScale -= Vector3.one * 0.25f;
if (transform.parent.parent.localScale.x < 0.6f) if (transform.parent.localScale.x < 0.6f)
{ {
transform.parent.parent.localScale = Vector3.one * 0.6f; transform.parent.localScale = Vector3.one * 0.6f;
} }
} }
Pos_1 = n_Pos_1; Pos_1 = n_Pos_1;
Pos_2 = n_Pos_2; Pos_2 = n_Pos_2;
GameMgr.Ins.tiMgr.SizeChange(transform.parent.localScale.x);
} }
} }
} }
...@@ -208,17 +189,12 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag ...@@ -208,17 +189,12 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag
//Debug.Log("涂过了"); //Debug.Log("涂过了");
return false; return false;
} }
//System.Diagnostics.Stopwatch ts = new System.Diagnostics.Stopwatch(); System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
//ts.Start(); sw.Start();
FunDo(v); FunDo(v);
//ts.Stop(); sw.Stop();
Debug.Log("耗时:" + sw.ElapsedMilliseconds);
//System.Diagnostics.Stopwatch dx = new System.Diagnostics.Stopwatch(); GameMgr.Ins.miMgr.Create(this, erd, v);
//dx.Start();
GameMgr.Ins.Create(this, erd, v);
//dx.Stop();
//Debug.Log("涂色耗时:" + ts.ElapsedMilliseconds + " 动效耗时:" + dx.ElapsedMilliseconds);
return true; return true;
} }
public void FunDo(Vector2 _v) public void FunDo(Vector2 _v)
...@@ -253,7 +229,7 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag ...@@ -253,7 +229,7 @@ public class MainData : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDrag
break; break;
} }
} }
//Debug.Log("循环次数:" + count); Debug.Log("循环次数:" + count);
png.Apply(); png.Apply();
} }
} }
......
...@@ -29,7 +29,7 @@ public class MaskItem : MonoBehaviour ...@@ -29,7 +29,7 @@ public class MaskItem : MonoBehaviour
{ {
gameObject.SetActive(false); gameObject.SetActive(false);
IsUse = -1; IsUse = -1;
GameMgr.Ins.Circle(this); GameMgr.Ins.miMgr.Circle(this);
} }
} }
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MaskItemMgr : MonoBehaviour
{
public List<MaskItem> useList = new List<MaskItem>();
public List<MaskItem> poolList = new List<MaskItem>();
public MaskItem item;
public MaskItem Get()
{
if (poolList.Count == 0)
{
MaskItem temp = GameObject.Instantiate<MaskItem>(item, item.transform.parent);
poolList.Add(temp);
}
MaskItem ret = poolList[0];
poolList.RemoveAt(0);
useList.Add(ret);
return ret;
}
public void Circle(MaskItem temp)
{
if (useList.Contains(temp))
{
useList.Remove(temp);
poolList.Add(temp);
}
}
public void Create(MainData md, ExRoomDatas erd, Vector3 v)
{
MaskItem temp = Get();
temp.FunDo(md, erd, v);
}
}
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4df351388788e484dbfc15294f9f0e7b guid: 0bbff69218fb22643bada9a26c88b010
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Material
m_Shader: {fileID: 4800000, guid: 8c9f3075cc39cfe41b9409237c27c014, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 5fa4e00fb3dd65d4d8a6b03a484b3161, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _RegionTex:
m_Texture: {fileID: 2800000, guid: c4a8d1f39b589d747ba0b9ecc99f8f5d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BlueRegionIntensity: 2
- _EnableExternalAlpha: 0
- _GreenRegionIntensity: 0.1
- _RedRegionIntensity: 0.1
m_Colors:
- _BlueRegionCol: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _GreenRegionCol: {r: 0, g: 0.93772507, b: 1, a: 0}
- _RedRegionCol: {r: 0.4339623, g: 0, b: 0, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
...@@ -53,11 +53,17 @@ public class RoomDatas ...@@ -53,11 +53,17 @@ public class RoomDatas
public int G; public int G;
public int B; public int B;
public int useAreaData; public int useAreaData;
public bool Check(V2 v)
{
return px == v.x && py == v.y;
}
} }
[Serializable] [Serializable]
public class RoomGroupsData public class RoomGroupsData
{ {
public int id; public int id;
public int curCount;
public List<int> roomIds = new List<int>(); public List<int> roomIds = new List<int>();
public int R; public int R;
public int G; public int G;
......
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Test"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
_RegionTex("Region Texture", 2D) = "white" {}
_RedRegionCol("Region Red Color", Color) = (1,1,1,1)
_GreenRegionCol("Region Green Color", Color) = (1,1,1,1)
_BlueRegionCol("Region Blue Color", Color) = (1,1,1,1)
_RedRegionIntensity("Red Region Intensity", Range(0.1, 2.0)) = 1.0
_GreenRegionIntensity("Green Region Intensity", Range(0.1, 2.0)) = 1.0
_BlueRegionIntensity("Blue Region Intensity", Range(0.1, 2.0)) = 1.0
}
SubShader
{
//Tags { "RenderType"="Opaque" }
Tags
{
"Queue" = "Transparent"
"RenderType" = "Transparent"
}
Blend SrcAlpha OneMinusSrcAlpha
LOD 100
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uvMain : TEXCOORD0;
float4 vertex : SV_POSITION;
float2 uvRegion : TEXCOORD1;
};
sampler2D _MainTex;
float4 _MainTex_ST;
sampler2D _RegionTex;
float4 _RegionTex_ST;
fixed4 _RedRegionCol;
fixed4 _GreenRegionCol;
fixed4 _BlueRegionCol;
half _RedRegionIntensity;
half _GreenRegionIntensity;
half _BlueRegionIntensity;
//fixed _GreenRegionAlpha;
//const half IGNORE_GRAY = 0.05;
v2f vert(appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uvMain = TRANSFORM_TEX(v.uv, _MainTex);
o.uvRegion = TRANSFORM_TEX(v.uv, _RegionTex);
return o;
}
fixed4 frag(v2f i) : SV_Target
{
// sample the texture
fixed4 baseCol = tex2D(_MainTex, i.uvMain);
fixed4 adjCol = tex2D(_RegionTex, i.uvRegion);
fixed3 tempCol = adjCol.r * _RedRegionCol.rgb * _RedRegionIntensity
+ adjCol.g * _GreenRegionCol.rgb * _GreenRegionIntensity
+ adjCol.b * _BlueRegionCol.rgb * _BlueRegionIntensity
+ adjCol.a * fixed3(1,1,1);
fixed3 finishCol = baseCol.rgb * tempCol;
return fixed4(finishCol, baseCol.a);
}
ENDCG
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 8c9f3075cc39cfe41b9409237c27c014
ShaderImporter:
externalObjects: {}
defaultTextures:
- _MainTex: {instanceID: 0}
- _RegionTex: {instanceID: 0}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class TextItem : TextMeshProUGUI
{
}
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing;
using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI;
public class ExText : TextMeshProUGUI public class TextItemMgr : MonoBehaviour
{ {
public static float size = 1; //当前缩放倍数 public List<TextItem> useList = new List<TextItem>();
public static Vector4 param = new Vector4(0.3f, 25, 0.1f, 1); // x的值以下隐藏 y:缩放等于x的缩放倍数的时候,大于等于y这个字号的字显示 z:基于x、y 每增加z值的缩放,w:允许显示的字号减去w值 //缩放小于x的值就全部隐藏,在大于等于x的值后,缩放每增加z的值,字号就会把y值减去w值的字体显示出来 public List<TextItem> poolList = new List<TextItem>();
public TextItem item;
public TextItem Get()
{
if (poolList.Count == 0)
{
TextItem temp = GameObject.Instantiate<TextItem>(item, item.transform.parent);
poolList.Add(temp);
}
TextItem ret = poolList[0];
poolList.RemoveAt(0);
useList.Add(ret);
return ret;
}
public void Circle(TextItem temp)
{
if (useList.Contains(temp))
{
useList.Remove(temp);
poolList.Add(temp);
}
}
public void Init(ResJsonData rjd, Texture2D png)
{
for (int i = 0; i < rjd.roomDatas.Count; i++)
{
RoomDatas rd = rjd.roomDatas[i];
TextItem temp = Get();
temp.gameObject.SetActive(true);
public static List<ExText> list = new List<ExText>(); temp.fontSize = rd.pr;
public static void SizeChange(float f) temp.transform.localPosition = new Vector3(rd.px - png.width / 2f, rd.py - png.height / 2f, 0);
for (int j = 0; j < rjd.roomGroupsData.Count; j++)
{
RoomGroupsData rgd = rjd.roomGroupsData[j];
if (rgd.roomIds.Contains(rd.id))
{
temp.text = rgd.id.ToString();
break;
}
}
}
}
public static float size = 1; //当前缩放倍数
public static Vector4 param = new Vector4(0.3f, 25, 0.1f, 1); // x的值以下隐藏 y:缩放等于x的缩放倍数的时候,大于等于y这个字号的字显示 z:基于x、y 每增加z值的缩放,w:允许显示的字
public void SizeChange(float f)
{ {
if (size == f) if (size == f)
{ {
return; return;
} }
size = f; size = f;
for (int i = 0; i < list.Count; i++) for (int i = 0; i < useList.Count; i++)
{ {
ExText text = list[i]; TextItem text = useList[i];
if (size < param.x) if (size < param.x)
{ {
text.gameObject.SetActive(false); text.gameObject.SetActive(false);
} }
else else
{ {
if(text.fontSize >= (param.y - (int)((size - param.x) / param.z) * param.w)) if (text.fontSize >= (param.y - (int)((size - param.x) / param.z) * param.w))
{ {
text.gameObject.SetActive(true); text.gameObject.SetActive(true);
} }
...@@ -38,14 +79,4 @@ public class ExText : TextMeshProUGUI ...@@ -38,14 +79,4 @@ public class ExText : TextMeshProUGUI
} }
} }
} }
public bool isUseActive = false;
protected override void Start()
{
base.Start();
if (isUseActive)
{
list.Add(this);
}
}
} }
fileFormatVersion: 2 fileFormatVersion: 2
guid: d42fb2947ce23de4b80fe5aded33009d guid: 4013539cbc0b23b4e95e892444ad2066
NativeFormatImporter: MonoImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 2100000 serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
...@@ -76,6 +76,141 @@ MonoBehaviour: ...@@ -76,6 +76,141 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &417385666573305620
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1203006329788771039}
- component: {fileID: 1404764647146932265}
- component: {fileID: 8128968991938406585}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1203006329788771039
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 417385666573305620}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 800309816225797410}
m_RootOrder: -1
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: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1404764647146932265
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 417385666573305620}
m_CullTransparentMesh: 1
--- !u!114 &8128968991938406585
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 417385666573305620}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 658c6ece9bc787940918e4b7f413a037, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 22222222
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1272658336346988519 --- !u!1 &1272658336346988519
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -183,6 +318,8 @@ RectTransform: ...@@ -183,6 +318,8 @@ RectTransform:
m_Children: m_Children:
- {fileID: 7902676659994826364} - {fileID: 7902676659994826364}
- {fileID: 7679003703182876708} - {fileID: 7679003703182876708}
- {fileID: 8460472138427881079}
- {fileID: 800309816225797410}
m_Father: {fileID: 2908597137679265870} m_Father: {fileID: 2908597137679265870}
m_RootOrder: -1 m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
...@@ -232,6 +369,59 @@ MonoBehaviour: ...@@ -232,6 +369,59 @@ MonoBehaviour:
imgpng: {fileID: 7126587409335573646} imgpng: {fileID: 7126587409335573646}
imgjpg: {fileID: 2338271980406512720} imgjpg: {fileID: 2338271980406512720}
rect: {fileID: 136994829194703267} rect: {fileID: 136994829194703267}
--- !u!1 &2488372294624611549
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 800309816225797410}
- component: {fileID: 1490190831900560014}
m_Layer: 5
m_Name: TextBox
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &800309816225797410
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2488372294624611549}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1203006329788771039}
m_Father: {fileID: 136994829194703267}
m_RootOrder: -1
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: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1490190831900560014
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2488372294624611549}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4013539cbc0b23b4e95e892444ad2066, type: 3}
m_Name:
m_EditorClassIdentifier:
useList: []
poolList: []
item: {fileID: 8128968991938406585}
--- !u!1 &5030817674743791695 --- !u!1 &5030817674743791695
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -446,7 +636,6 @@ RectTransform: ...@@ -446,7 +636,6 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 136994829194703267} - {fileID: 136994829194703267}
- {fileID: 8460472138427881079}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: -1 m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
...@@ -468,9 +657,8 @@ MonoBehaviour: ...@@ -468,9 +657,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
md: {fileID: 4535739684591336511} md: {fileID: 4535739684591336511}
useList: [] miMgr: {fileID: 5326343875061023361}
poolList: [] tiMgr: {fileID: 1490190831900560014}
item: {fileID: 2612623115589112712}
--- !u!1 &9134782076413536134 --- !u!1 &9134782076413536134
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -480,6 +668,7 @@ GameObject: ...@@ -480,6 +668,7 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 8460472138427881079} - component: {fileID: 8460472138427881079}
- component: {fileID: 5326343875061023361}
m_Layer: 5 m_Layer: 5
m_Name: MaskBox m_Name: MaskBox
m_TagString: Untagged m_TagString: Untagged
...@@ -494,13 +683,13 @@ RectTransform: ...@@ -494,13 +683,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9134782076413536134} m_GameObject: {fileID: 9134782076413536134}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 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_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 3859749812772851665} - {fileID: 3859749812772851665}
m_Father: {fileID: 2908597137679265870} m_Father: {fileID: 136994829194703267}
m_RootOrder: -1 m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
...@@ -508,3 +697,18 @@ RectTransform: ...@@ -508,3 +697,18 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5326343875061023361
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9134782076413536134}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0bbff69218fb22643bada9a26c88b010, type: 3}
m_Name:
m_EditorClassIdentifier:
useList: []
poolList: []
item: {fileID: 2612623115589112712}
This diff is collapsed.
...@@ -98,7 +98,7 @@ public class ScaleToImage : MonoBehaviour ...@@ -98,7 +98,7 @@ public class ScaleToImage : MonoBehaviour
} }
private void ChangeFontSize(float scalesize) private void ChangeFontSize(float scalesize)
{ {
ExText.SizeChange(scalesize/2f); //TextItem.SizeChange(scalesize/2f);
} }
private void Scale() private void Scale()
{ {
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 804bd96816d3e4644a15363efb564de6 guid: 77c0c41e39870744f911b1759f678709
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment