LiuQilin %!s(int64=8) %!d(string=hai) anos
pai
achega
87629cfc5e

BIN=BIN
.vs/MyLovelyGarden/v14/.suo


BIN=BIN
Assets/Resources/Garden.unity


BIN=BIN
Assets/Resources/Prefab/PrefabUI/Canvas.prefab


BIN=BIN
Assets/Resources/Prefab/PrefabUI/SkillItem.prefab


+ 0 - 9
Assets/Resources/Temp.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 0dcf62c8561c02f479195703efe90da2
-folderAsset: yes
-timeCreated: 1486173350
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 2 - 1
Assets/Resources/XML/Config/PlayerConfig.xml

@@ -1,4 +1,5 @@
 <PlayerConfig>
+  <Version value="1" />
   <Slot value="7" />
   <Sign value="0" />
   <Coin value="0" />
@@ -7,7 +8,7 @@
   <Diamond value="0" />
   <QuitTime value="3/24/2017 10:40:04 PM" />
   <MiniTimer value="0" />
-  <CircleTimer value="0" />
+  <CircleTimer value="10" />
   <CoinPerson value="0" />
   <PlantList SlotA1="1" SlotA2="2" SlotA3="3" SlotA4="4" SlotA5="5" SlotA6="6" SlotA7="7" SlotA8="8" SlotA9="9" />
   <FlowerList ID="1 2 3 4 5 6 7 8 9 10" />

+ 55 - 6
Assets/Script/Tool/Data.cs

@@ -30,29 +30,78 @@ public class Data
         {
             if (_PlayerDoc == null)
             {
-                FileInfo fileInfo = new FileInfo(Application.persistentDataPath + "/PlayerConfig.xml");
+                int version = 0;
+                int nativeVersion = 0;
+                XmlNode temoNode;
+                XmlDocument tempDoc1;
+                XmlDocument tempDoc2;
 
+                FileInfo fileInfo = new FileInfo(Application.persistentDataPath + "/PlayerConfig.xml");
+                
                 if (fileInfo.Exists)
                 {
                     StreamReader sr = new StreamReader(Application.persistentDataPath + "/PlayerConfig.xml");
 
-                    _PlayerDoc = new XmlDocument();
-                    _PlayerDoc.LoadXml(sr.ReadToEnd());
+                    tempDoc1 = new XmlDocument();
+                    tempDoc1.LoadXml(sr.ReadToEnd());
 
                     sr.Close();
+
+                    TextAsset textAsset = Bundle.Config.LoadAsset<TextAsset>("PlayerConfig");
+
+                    tempDoc2 = new XmlDocument();
+                    tempDoc2.LoadXml(textAsset.text);
+                    
+                    version = int.Parse(tempDoc2.SelectSingleNode("PlayerConfig").SelectSingleNode("Version").Attributes[0].Value);
+
+                    temoNode = tempDoc1.SelectSingleNode("PlayerConfig").SelectSingleNode("Version");
+
+                    if (temoNode == null)
+                    {
+                        StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
+
+                        sw.Write(tempDoc2.OuterXml);
+
+                        sw.Close();
+
+                        _PlayerDoc = tempDoc2;
+                    }
+                    else
+                    {
+                        nativeVersion = int.Parse(temoNode.Attributes[0].Value);
+
+                        if (nativeVersion != version)
+                        {
+                            StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
+
+                            sw.Write(tempDoc2.OuterXml);
+
+                            sw.Close();
+
+                            _PlayerDoc = tempDoc2;
+                        }
+                        else
+                        {
+                            _PlayerDoc = tempDoc1;
+                        }
+                    }
                 }
                 else
                 {
                     TextAsset textAsset = Bundle.Config.LoadAsset<TextAsset>("PlayerConfig");
 
-                    _PlayerDoc = new XmlDocument();
-                    _PlayerDoc.LoadXml(textAsset.text);
+                    tempDoc2 = new XmlDocument();
+                    tempDoc2.LoadXml(textAsset.text);
 
                     StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
 
-                    sw.Write(_PlayerDoc.OuterXml);
+                    sw.Write(tempDoc2.OuterXml);
 
                     sw.Close();
+
+                    _PlayerDoc = tempDoc2;
+
+                    _PlayerDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
                 }
             }
 

+ 1 - 1
Assets/Script/Tool/SpriteAsset.cs

@@ -70,10 +70,10 @@ public class SpriteAsset : MonoBehaviour
                 Vector2 lrUv = new Vector2(sprite.rect.xMax / width, sprite.rect.yMin / height);
 
                 spriteInfo.UvList = new List<Vector2>();
-                spriteInfo.UvList.Add(llUv);
                 spriteInfo.UvList.Add(ulUv);
                 spriteInfo.UvList.Add(urUv);
                 spriteInfo.UvList.Add(lrUv);
+                spriteInfo.UvList.Add(llUv);
                 
                 _SpriteInfoDic.Add(spriteInfo.Name, spriteInfo);
             }

+ 373 - 116
Assets/Script/Tool/UI/TextPlus.cs

@@ -5,19 +5,74 @@ using System.Linq;
 using System.Collections;
 using System.Collections.Generic;
 
-public class TextPlus : Text
+public class LineInfo
 {
-    #region
+    public int Count;
+    public int EndIndex;
+    public int StartIndex;
+
+    public LineInfo(int startIndex, int endIndex)
+    {
+        EndIndex = endIndex;
+        StartIndex = startIndex;
+
+        Count = EndIndex - StartIndex + 1;
+    }
+}
+
+public class RenderInfo
+{
+    public LineInfo LineInfo
+    {
+        get { return _LineInfo; }
+        set
+        {
+            _LineInfo = value;
+
+            EndIndex = _LineInfo.EndIndex;
+            StartIndex = _LineInfo.StartIndex;
+            LineCount = _LineInfo.Count;
+        }
+    }
+    public SpriteInfo SpriteInfo
+    {
+        get { return _SpriteInfo; }
+        set
+        {
+            _SpriteInfo = value;
+
+            UvList = _SpriteInfo.UvList;
+            RawWidth = _SpriteInfo.Width;
+            RawHeight = _SpriteInfo.Height;
+
+            RenderCount = RightIndex - LeftIndex + 1;
+        }
+    }
+
+    private LineInfo _LineInfo;
+    private SpriteInfo _SpriteInfo;
+
+    public int LineCount;
+    public int RenderCount;
 
     public int LeftIndex;
     public int RightIndex;
-    public int BreakIndex;
 
-    public bool Draw;
+    public int EndIndex;
+    public int StartIndex;
+
     public float Width;
     public float Height;
-    public string SpriteName;
-    public SpriteInfo SpriteInfo;
+
+    public float RawWidth;
+    public float RawHeight;
+
+    public List<Vector2> UvList;
+}
+
+public class TextPlus : Text
+{
+    #region 变量
 
     public ImagePlus ImagePlus
     {
@@ -26,6 +81,15 @@ public class TextPlus : Text
             if (_ImagePlus == null)
             {
                 _ImagePlus = GetComponentInChildren<ImagePlus>();
+
+                if (_ImagePlus == null)
+                {
+                    GameObject go = new GameObject("ImagePlus", typeof(ImagePlus));
+
+                    RectTransform rectTra = go.GetComponent<RectTransform>();
+
+                    rectTra.SetParent(rectTransform);
+                }
             }
 
             return _ImagePlus;
@@ -35,33 +99,50 @@ public class TextPlus : Text
 
     private ImagePlus _ImagePlus;
 
+    public bool Draw;
+    public RenderInfo RenderInfo;
+
+    public List<LineInfo> LineInfoList;
+
     #endregion
 
-    protected override void OnPopulateMesh(VertexHelper toFill)
+    protected override void Awake()
     {
-        base.OnPopulateMesh(toFill);
+        base.Awake();
 
-        if (ImagePlus == null)
-        {
-            Debug.LogWarning("There is no ImagePlus");
+        verticalOverflow = VerticalWrapMode.Overflow;
+        horizontalOverflow = HorizontalWrapMode.Overflow;
+    }
 
-            return;
-        }
+    protected override void OnPopulateMesh(VertexHelper toFill)
+    {
+        base.OnPopulateMesh(toFill);
 
-        LeftIndex = text.IndexOf("<(");
-        RightIndex = text.IndexOf(")>");
+        int leftIndex = text.IndexOf("<(");
+        int rightIndex = text.IndexOf(")>");
 
-        if (LeftIndex == -1 || RightIndex == -1)
+        if (leftIndex == -1 || rightIndex == -1)
         {
             Draw = false;
         }
         else
         {
-            SpriteName = text.Between(LeftIndex + 2, RightIndex - 1);
+            rightIndex++;
 
-            if (SpriteAsset.SpriteInfoDic.TryGetValue(SpriteName, out SpriteInfo))
+            string spriteName = text.Between(leftIndex + 2, rightIndex - 2);
+
+            SpriteInfo spriteInfo;
+
+            if (SpriteAsset.SpriteInfoDic.TryGetValue(spriteName, out spriteInfo))
             {
                 Draw = true;
+
+                RenderInfo = new RenderInfo();
+
+                RenderInfo.LeftIndex = leftIndex;
+                RenderInfo.RightIndex = rightIndex;
+
+                RenderInfo.SpriteInfo = spriteInfo;
             }
             else
             {
@@ -72,149 +153,325 @@ public class TextPlus : Text
         if (Draw)
         {
             Draw = false;
-            
-            UIVertex[] vertices = new UIVertex[4];
 
-            List<UIVertex> vertexList = new List<UIVertex>();
+            List<UIVertex> vertexImage = new List<UIVertex>();
+            List<UIVertex> vertexStream = new List<UIVertex>();
 
-            toFill.GetUIVertexStream(vertexList);
-            
-            int row = text.Split('\n').Length;
+            toFill.GetUIVertexStream(vertexStream);
+
+            RenderInfo.Height = preferredHeight / cachedTextGenerator.lineCount;
+            RenderInfo.Width = (RenderInfo.Height / RenderInfo.RawHeight) * RenderInfo.RawWidth;
+
+            GetRenderLine();
+
+            RenderLine(vertexImage, vertexStream, toFill);
+
+            ImagePlus.UpdateStatus(true, new VertexHelper(), vertexImage);
+        }
+        else
+        {
+            ImagePlus.UpdateStatus(false, new VertexHelper(), null);
+        }
+    }
 
-            if (row == 1)
-            {
-                BreakIndex = text.Length;
-            }
-            else
-            {
-                BreakIndex = text.IndexOf('\n');
-            }
 
-            Height = preferredHeight/row;
+    protected void RenderLine(List<UIVertex> vertexImage, List<UIVertex> vertexStream, VertexHelper vertexHelper)
+    {
+        UIVertex[] vertices = new UIVertex[4];
+
+        vertices[0].color = Color.white;
+        vertices[1].color = Color.white;
+        vertices[2].color = Color.white;
+        vertices[3].color = Color.white;
 
-            Width = (Height / SpriteInfo.Height) * SpriteInfo.Width;
+        vertices[0].uv0 = RenderInfo.UvList[0];
+        vertices[1].uv0 = RenderInfo.UvList[1];
+        vertices[2].uv0 = RenderInfo.UvList[2];
+        vertices[3].uv0 = RenderInfo.UvList[3];
 
-            Vector3 centerLeft;
+        if (RenderInfo.LineCount == RenderInfo.RenderCount)
+        {
+            #region MyRegion
 
-            if (LeftIndex == 0)
+            if (alignment == TextAnchor.LowerCenter || alignment == TextAnchor.MiddleCenter || alignment == TextAnchor.UpperCenter)
             {
-                centerLeft = (vertexList[LeftIndex * 6 + 4].position + vertexList[LeftIndex * 6 + 5].position) / 2;
+                #region MyRegion
+
+                Vector3 center = new Vector3(0, (vertexStream[RenderInfo.StartIndex * 6].position.y + vertexStream[RenderInfo.StartIndex * 6 + 4].position.y) / 2, 0);
+
+                vertices[0].position = center + new Vector3(-RenderInfo.Width / 2, RenderInfo.Height / 2, 0);
+                vertices[1].position = center + new Vector3(RenderInfo.Width / 2, RenderInfo.Height / 2, 0);
+                vertices[2].position = center + new Vector3(RenderInfo.Width / 2, -RenderInfo.Height / 2, 0);
+                vertices[3].position = center + new Vector3(-RenderInfo.Width / 2, -RenderInfo.Height / 2, 0);
+
+                #endregion
             }
-            else
+            else if (alignment == TextAnchor.LowerRight || alignment == TextAnchor.MiddleRight || alignment == TextAnchor.UpperRight)
             {
-                centerLeft = (vertexList[(LeftIndex -1)* 6 + 1].position + vertexList[(LeftIndex - 1)*6 + 2].position) / 2;
-            }
+                #region MyRegion
 
-            vertices[0].position = centerLeft + new Vector3(0, -Height/2, 0);
-            vertices[1].position = centerLeft + new Vector3(0, Height/2, 0);
-            vertices[2].position = centerLeft + new Vector3(Width, Height/2, 0);
-            vertices[3].position = centerLeft + new Vector3(Width, -Height/2, 0);
+                Vector3 centerRight = (vertexStream[RenderInfo.RightIndex * 6 + 1].position + vertexStream[RenderInfo.RightIndex * 6 + 2].position) / 2;
 
-            vertices[0].color = Color.white;
-            vertices[1].color = Color.white;
-            vertices[2].color = Color.white;
-            vertices[3].color = Color.white;
+                vertices[0].position = centerRight + new Vector3(-RenderInfo.Width, RenderInfo.Height / 2, 0);
+                vertices[1].position = centerRight + new Vector3(0, RenderInfo.Height / 2, 0);
+                vertices[2].position = centerRight + new Vector3(0, -RenderInfo.Height / 2, 0);
+                vertices[3].position = centerRight + new Vector3(-RenderInfo.Width, -RenderInfo.Height / 2, 0);
 
-            vertices[0].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[0];
-            vertices[1].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[1];
-            vertices[2].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[2];
-            vertices[3].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[3];
+                #endregion
+            }
+            else if (alignment == TextAnchor.LowerLeft || alignment == TextAnchor.MiddleLeft || alignment == TextAnchor.UpperLeft)
+            {
+                #region MyRegion
 
-            UIVertex vertex = new UIVertex();
+                Vector3 centerLeft = (vertexStream[0].position + vertexStream[4].position) / 2;
 
-            for (int i = LeftIndex; i < RightIndex + 2; i++)
-            {
-                toFill.SetUIVertex(vertex, i*4);
-                toFill.SetUIVertex(vertex, i*4 + 1);
-                toFill.SetUIVertex(vertex, i*4 + 2);
-                toFill.SetUIVertex(vertex, i*4 + 3);
+                vertices[0].position = centerLeft + new Vector3(0, RenderInfo.Height / 2, 0);
+                vertices[1].position = centerLeft + new Vector3(RenderInfo.Width, RenderInfo.Height / 2, 0);
+                vertices[2].position = centerLeft + new Vector3(RenderInfo.Width, -RenderInfo.Height / 2, 0);
+                vertices[3].position = centerLeft + new Vector3(0, -RenderInfo.Height / 2, 0);
+
+                #endregion
             }
 
-            if (LeftIndex == 0)
+            #endregion
+        }
+        else
+        {
+            #region MyRegion
+
+            if (alignment == TextAnchor.LowerCenter || alignment == TextAnchor.MiddleCenter || alignment == TextAnchor.UpperCenter)
             {
-                float offsetX1 = vertexList[(RightIndex + 2) * 6].position.x - vertices[3].position.x;
+                #region MyRegion
 
-                float offsetX2 = (vertexList[(BreakIndex - 1) * 6 + 1].position.x + vertices[0].position.x - offsetX1) / 2;
+                Vector3 centerLeft = new Vector3();
 
-                for (int i = RightIndex + 2; i < BreakIndex; i++)
+                if (RenderInfo.LeftIndex == RenderInfo.StartIndex)
                 {
-                    vertex = vertexList[i * 6];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4);
-
-                    vertex = vertexList[i * 6 + 1];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 1);
+                    centerLeft = (vertexStream[RenderInfo.LeftIndex * 6].position + vertexStream[RenderInfo.LeftIndex * 6 + 4].position) / 2;
+                }
+                else
+                {
+                    centerLeft = (vertexStream[(RenderInfo.LeftIndex - 1) * 6 + 1].position + vertexStream[(RenderInfo.LeftIndex - 1) * 6 + 2].position) / 2;
+                }
 
-                    vertex = vertexList[i * 6 + 2];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 2);
+                vertices[0].position = centerLeft + new Vector3(0, RenderInfo.Height / 2, 0);
+                vertices[1].position = centerLeft + new Vector3(RenderInfo.Width, RenderInfo.Height / 2, 0);
+                vertices[2].position = centerLeft + new Vector3(RenderInfo.Width, -RenderInfo.Height / 2, 0);
+                vertices[3].position = centerLeft + new Vector3(0, -RenderInfo.Height / 2, 0);
 
-                    vertex = vertexList[i * 6 + 4];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 3);
+                if ((RenderInfo.RightIndex) != RenderInfo.EndIndex)
+                {
+                    float offsetX1 = vertexStream[(RenderInfo.RightIndex + 1) * 6].position.x - vertices[1].position.x;
+                    float offsetX2 = (vertexStream[RenderInfo.EndIndex * 6 + 1].position.x + vertexStream[RenderInfo.StartIndex * 6].position.x - offsetX1) / 2;
+
+                    UIVertex newVertex;
+
+                    for (int i = RenderInfo.RightIndex + 1; i < RenderInfo.EndIndex + 1; i++)
+                    {
+                        newVertex = vertexStream[i * 6];
+                        newVertex.position.x -= offsetX1 + offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4);
+
+                        newVertex = vertexStream[i * 6 + 1];
+                        newVertex.position.x -= offsetX1 + offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 1);
+
+                        newVertex = vertexStream[i * 6 + 2];
+                        newVertex.position.x -= offsetX1 + offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 2);
+
+                        newVertex = vertexStream[i * 6 + 4];
+                        newVertex.position.x -= offsetX1 + offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 3);
+                    }
+
+                    for (int i = RenderInfo.StartIndex; i < RenderInfo.LeftIndex; i++)
+                    {
+                        newVertex = vertexStream[i * 6];
+                        newVertex.position.x -= offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4);
+
+                        newVertex = vertexStream[i * 6 + 1];
+                        newVertex.position.x -= offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 1);
+
+                        newVertex = vertexStream[i * 6 + 2];
+                        newVertex.position.x -= offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 2);
+
+                        newVertex = vertexStream[i * 6 + 4];
+                        newVertex.position.x -= offsetX2;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 3);
+                    }
+
+                    vertices[0].position.x -= offsetX2;
+                    vertices[1].position.x -= offsetX2;
+                    vertices[2].position.x -= offsetX2;
+                    vertices[3].position.x -= offsetX2;
                 }
 
-                vertices[0].position.x -= offsetX2;
-                vertices[1].position.x -= offsetX2;
-                vertices[2].position.x -= offsetX2;
-                vertices[3].position.x -= offsetX2;
+                #endregion
             }
-            else
+            else if (alignment == TextAnchor.LowerRight || alignment == TextAnchor.MiddleRight || alignment == TextAnchor.UpperRight)
             {
-                float offsetX1 = vertexList[(RightIndex + 2) * 6].position.x - vertices[3].position.x;
+                #region MyRegion
+
+                Vector3 centerRight = new Vector3();
+
+                if ((RenderInfo.RightIndex) == RenderInfo.EndIndex)
+                {
+                    centerRight = (vertexStream[RenderInfo.EndIndex * 6 + 1].position + vertexStream[RenderInfo.EndIndex * 6 + 2].position) / 2;
+                }
+                else
+                {
+                    centerRight = (vertexStream[(RenderInfo.RightIndex) * 6 + 1].position + vertexStream[(RenderInfo.RightIndex) * 6 + 2].position) / 2;
+                }
 
-                float offsetX2 = (vertexList[(BreakIndex - 1) * 6 + 1].position.x + vertexList[0].position.x - offsetX1) / 2;
+                vertices[0].position = centerRight + new Vector3(-RenderInfo.Width, RenderInfo.Height / 2, 0);
+                vertices[1].position = centerRight + new Vector3(0, RenderInfo.Height / 2, 0);
+                vertices[2].position = centerRight + new Vector3(0, -RenderInfo.Height / 2, 0);
+                vertices[3].position = centerRight + new Vector3(-RenderInfo.Width, -RenderInfo.Height / 2, 0);
 
-                for (int i = 0; i < LeftIndex; i++)
+                if (RenderInfo.LeftIndex != RenderInfo.StartIndex)
                 {
-                    vertex = vertexList[i * 6];
-                    vertex.position.x -= offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4);
+                    float offsetX1 = vertices[0].position.x - vertexStream[(RenderInfo.LeftIndex - 1) * 6 + 1].position.x;
+
+                    UIVertex newVertex;
 
-                    vertex = vertexList[i * 6 + 1];
-                    vertex.position.x -= offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 1);
+                    for (int i = RenderInfo.StartIndex; i < RenderInfo.LeftIndex; i++)
+                    {
+                        newVertex = vertexStream[i * 6];
+                        newVertex.position.x += offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4);
 
-                    vertex = vertexList[i * 6 + 2];
-                    vertex.position.x -= offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 2);
+                        newVertex = vertexStream[i * 6 + 1];
+                        newVertex.position.x += offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 1);
 
-                    vertex = vertexList[i * 6 + 4];
-                    vertex.position.x -= offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 3);
+                        newVertex = vertexStream[i * 6 + 2];
+                        newVertex.position.x += offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 2);
+
+                        newVertex = vertexStream[i * 6 + 4];
+                        newVertex.position.x += offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 3);
+                    }
+                }
+
+                #endregion
+            }
+            else if (alignment == TextAnchor.LowerLeft || alignment == TextAnchor.MiddleLeft || alignment == TextAnchor.UpperLeft)
+            {
+                #region MyRegion
+
+                Vector3 centerLeft = new Vector3();
+
+                if (RenderInfo.LeftIndex == RenderInfo.StartIndex)
+                {
+                    centerLeft = (vertexStream[RenderInfo.LeftIndex * 6].position + vertexStream[RenderInfo.LeftIndex * 6 + 4].position) / 2;
                 }
+                else
+                {
+                    centerLeft = (vertexStream[(RenderInfo.LeftIndex - 1) * 6 + 1].position + vertexStream[(RenderInfo.LeftIndex - 1) * 6 + 2].position) / 2;
+                }
+
+                vertices[0].position = centerLeft + new Vector3(0, RenderInfo.Height / 2, 0);
+                vertices[1].position = centerLeft + new Vector3(RenderInfo.Width, RenderInfo.Height / 2, 0);
+                vertices[2].position = centerLeft + new Vector3(RenderInfo.Width, -RenderInfo.Height / 2, 0);
+                vertices[3].position = centerLeft + new Vector3(0, -RenderInfo.Height / 2, 0);
 
-                for (int i = RightIndex + 2; i < BreakIndex; i++)
+                if ((RenderInfo.RightIndex) != RenderInfo.EndIndex)
                 {
-                    vertex = vertexList[i * 6];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4);
+                    float offsetX1 = vertexStream[(RenderInfo.RightIndex + 1) * 6].position.x - vertices[1].position.x;
+
+                    UIVertex newVertex;
+
+                    for (int i = RenderInfo.RightIndex + 1; i < RenderInfo.EndIndex + 1; i++)
+                    {
+                        newVertex = vertexStream[i * 6];
+                        newVertex.position.x -= offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4);
 
-                    vertex = vertexList[i * 6 + 1];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 1);
+                        newVertex = vertexStream[i * 6 + 1];
+                        newVertex.position.x -= offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 1);
 
-                    vertex = vertexList[i * 6 + 2];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 2);
+                        newVertex = vertexStream[i * 6 + 2];
+                        newVertex.position.x -= offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 2);
 
-                    vertex = vertexList[i * 6 + 4];
-                    vertex.position.x -= offsetX1 + offsetX2;
-                    toFill.SetUIVertex(vertex, i * 4 + 3);
+                        newVertex = vertexStream[i * 6 + 4];
+                        newVertex.position.x -= offsetX1;
+                        vertexHelper.SetUIVertex(newVertex, i * 4 + 3);
+                    }
                 }
 
-                vertices[0].position.x -= offsetX2;
-                vertices[1].position.x -= offsetX2;
-                vertices[2].position.x -= offsetX2;
-                vertices[3].position.x -= offsetX2;
+                #endregion
             }
 
-            ImagePlus.UpdateStatus(true, new VertexHelper(), vertices.ToList());
+            #endregion
         }
-        else
+
+        vertexImage.AddRange(vertices);
+
+        UIVertex vertex = new UIVertex();
+
+        for (int i = RenderInfo.LeftIndex; i < RenderInfo.RightIndex + 1; i++)
         {
-            ImagePlus.UpdateStatus(false, new VertexHelper(), null);
+            vertexHelper.SetUIVertex(vertex, i * 4);
+            vertexHelper.SetUIVertex(vertex, i * 4 + 1);
+            vertexHelper.SetUIVertex(vertex, i * 4 + 2);
+            vertexHelper.SetUIVertex(vertex, i * 4 + 3);
+        }
+    }
+
+
+    protected List<LineInfo> GetLineInfo()
+    {
+        int startIndex = 0;
+
+        List<LineInfo> lineInfoList = new List<LineInfo>();
+
+        if (cachedTextGenerator.lineCount > 1)
+        {
+            for (int i = 0; i < text.Length; i++)
+            {
+                if (text[i] == '\n')
+                {
+                    if (text[startIndex] != '\n')
+                    {
+                        lineInfoList.Add(new LineInfo(startIndex, i));
+                    }
+
+                    if (i + 1 == text.Length)
+                    {
+                        return lineInfoList;
+                    }
+                    else
+                    {
+                        startIndex = i + 1;
+                    }
+                }
+            }
+        }
+
+        lineInfoList.Add(new LineInfo(startIndex, text.Length - 1));
+
+        return lineInfoList;
+    }
+
+    protected void GetRenderLine()
+    {
+        List<LineInfo> lineInfoList = GetLineInfo();
+
+        for (int i = 0; i < lineInfoList.Count; i++)
+        {
+            if (RenderInfo.LeftIndex >= lineInfoList[i].StartIndex && RenderInfo.LeftIndex < lineInfoList[i].EndIndex)
+            {
+                RenderInfo.LineInfo = lineInfoList[i];
+
+                break;
+            }
         }
     }
 }

+ 0 - 316
Assets/TestText.cs

@@ -1,316 +0,0 @@
-using UnityEngine;
-using UnityEngine.UI;
-
-using System.Linq;
-using System.Collections;
-using System.Collections.Generic;
-
-public class LineInfo
-{
-    public int EndIndex;
-    public int StartIndex;
-
-    public LineInfo(int startIndex, int endIndex)
-    {
-        EndIndex = endIndex;
-        StartIndex = startIndex;
-    }
-}
-
-public class RenderInfo
-{
-    public LineInfo LineInfo;
-    public SpriteInfo SpriteInfo;
-
-    public RenderInfo(LineInfo lineInfo, SpriteInfo spriteInfo)
-    {
-        LineInfo = lineInfo;
-        SpriteInfo = spriteInfo;
-    }
-}
-
-public class TestText : Text
-{
-	#region 变量
-
-    public int LeftIndex;
-    public int RightIndex;
-
-    public bool Draw;
-    public float Width;
-    public float Height;
-    public string SpriteName;
-    public SpriteInfo SpriteInfo;
-    public List<LineInfo> LineInfoList;
-    public List<UIVertex> VertexImage;
-    public List<UIVertex> VertexStream;
-    public List<RenderInfo> RenderInfoList;
-
-    public ImagePlus ImagePlus
-    {
-        get
-        {
-            if (_ImagePlus == null)
-            {
-                _ImagePlus = GetComponentInChildren<ImagePlus>();
-
-                if (_ImagePlus == null)
-                {
-                    GameObject go = new GameObject("ImagePlus", typeof(ImagePlus));
-
-                    RectTransform rectTra = go.GetComponent<RectTransform>();
-
-                    rectTra.SetParent(rectTransform);
-                }
-            }
-
-            return _ImagePlus;
-        }
-        set { _ImagePlus = value; }
-    }
-
-    private ImagePlus _ImagePlus;
-
-    #endregion
-
-    protected override void Awake()
-    {
-        base.Awake();
-
-        verticalOverflow = VerticalWrapMode.Overflow;
-        horizontalOverflow = HorizontalWrapMode.Wrap;
-    }
-
-    protected override void OnPopulateMesh(VertexHelper toFill)
-    {
-        base.OnPopulateMesh(toFill);
-
-        if (ImagePlus == null)
-        {
-            Debug.LogWarning("There is no ImagePlus");
-
-            return;
-        }
-
-        LeftIndex = text.IndexOf("<(");
-        RightIndex = text.IndexOf(")>");
-
-        if (LeftIndex == -1 || RightIndex == -1)
-        {
-            Draw = false;
-        }
-        else
-        {
-            SpriteName = text.Between(LeftIndex + 2, RightIndex - 1);
-
-            if (SpriteAsset.SpriteInfoDic.TryGetValue(SpriteName, out SpriteInfo))
-            {
-                Draw = true;
-            }
-            else
-            {
-                Draw = false;
-            }
-        }
-
-        if (Draw)
-        {
-            Draw = false;
-
-            VertexImage = new List<UIVertex>();
-            VertexStream = new List<UIVertex>();
-
-            toFill.GetUIVertexStream(VertexStream);
-
-            Height = preferredHeight / cachedTextGenerator.lineCount;
-
-            Width = (Height / SpriteInfo.Height) * SpriteInfo.Width;
-
-            LineInfoList = GetLineInfo();
-
-            RenderInfoList = GetRenderInfo();
-
-            RenderLine(RenderInfoList[0], VertexImage, VertexStream, toFill);
-
-            ImagePlus.UpdateStatus(true, new VertexHelper(), VertexImage);
-        }
-        else
-        {
-            ImagePlus.UpdateStatus(false, new VertexHelper(), null);
-        }
-    }
-
-
-    protected void RenderLine(RenderInfo renderInfo, List<UIVertex> vertexImage, List<UIVertex> vertexStream, VertexHelper toFill)
-    {
-        Vector3 centerLeft = new Vector3();
-
-        if (LeftIndex == renderInfo.LineInfo.StartIndex)
-        {
-            centerLeft = (vertexStream[LeftIndex * 6 + 4].position + vertexStream[LeftIndex * 6 + 5].position) / 2;
-        }
-        else
-        {
-            centerLeft = (vertexStream[(LeftIndex - 1) * 6 + 1].position + vertexStream[(LeftIndex - 1) * 6 + 2].position) / 2;
-        }
-
-        UIVertex[] vertices = new UIVertex[4];
-
-        vertices[0].position = centerLeft + new Vector3(0, -Height / 2, 0);
-        vertices[1].position = centerLeft + new Vector3(0, Height / 2, 0);
-        vertices[2].position = centerLeft + new Vector3(Width, Height / 2, 0);
-        vertices[3].position = centerLeft + new Vector3(Width, -Height / 2, 0);
-
-        vertices[0].color = Color.white;
-        vertices[1].color = Color.white;
-        vertices[2].color = Color.white;
-        vertices[3].color = Color.white;
-
-        vertices[0].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[0];
-        vertices[1].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[1];
-        vertices[2].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[2];
-        vertices[3].uv0 = SpriteAsset.SpriteInfoDic[SpriteName].UvList[3];
-
-        UIVertex vertex = new UIVertex();
-
-        for (int i = LeftIndex; i < RightIndex + 2; i++)
-        {
-            toFill.SetUIVertex(vertex, i * 4);
-            toFill.SetUIVertex(vertex, i * 4 + 1);
-            toFill.SetUIVertex(vertex, i * 4 + 2);
-            toFill.SetUIVertex(vertex, i * 4 + 3);
-        }
-
-        if (LeftIndex == renderInfo.LineInfo.StartIndex)
-        {
-            float offsetX1 = VertexStream[(RightIndex + 2) * 6].position.x - vertices[3].position.x;
-
-            float offsetX2 = (VertexStream[(BreakIndex - 1) * 6 + 1].position.x + vertices[0].position.x - offsetX1) / 2;
-
-            for (int i = RightIndex + 2; i < BreakIndex; i++)
-            {
-                vertex = VertexStream[i * 6];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4);
-
-                vertex = VertexStream[i * 6 + 1];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 1);
-
-                vertex = VertexStream[i * 6 + 2];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 2);
-
-                vertex = VertexStream[i * 6 + 4];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 3);
-            }
-
-            vertices[0].position.x -= offsetX2;
-            vertices[1].position.x -= offsetX2;
-            vertices[2].position.x -= offsetX2;
-            vertices[3].position.x -= offsetX2;
-        }
-        else
-        {
-            float offsetX1 = VertexStream[(RightIndex + 2) * 6].position.x - vertices[3].position.x;
-
-            float offsetX2 = (VertexStream[(BreakIndex - 1) * 6 + 1].position.x + VertexStream[0].position.x - offsetX1) / 2;
-
-            for (int i = 0; i < LeftIndex; i++)
-            {
-                vertex = VertexStream[i * 6];
-                vertex.position.x -= offsetX2;
-                toFill.SetUIVertex(vertex, i * 4);
-
-                vertex = VertexStream[i * 6 + 1];
-                vertex.position.x -= offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 1);
-
-                vertex = VertexStream[i * 6 + 2];
-                vertex.position.x -= offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 2);
-
-                vertex = VertexStream[i * 6 + 4];
-                vertex.position.x -= offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 3);
-            }
-
-            for (int i = RightIndex + 2; i < BreakIndex; i++)
-            {
-                vertex = VertexStream[i * 6];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4);
-
-                vertex = VertexStream[i * 6 + 1];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 1);
-
-                vertex = VertexStream[i * 6 + 2];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 2);
-
-                vertex = VertexStream[i * 6 + 4];
-                vertex.position.x -= offsetX1 + offsetX2;
-                toFill.SetUIVertex(vertex, i * 4 + 3);
-            }
-
-            vertices[0].position.x -= offsetX2;
-            vertices[1].position.x -= offsetX2;
-            vertices[2].position.x -= offsetX2;
-            vertices[3].position.x -= offsetX2;
-        }
-    }
-
-
-    protected List<LineInfo> GetLineInfo()
-    {
-        int startIndex = 0;
-
-        List<LineInfo> lineInfoList = new List<LineInfo>();
-
-        if (cachedTextGenerator.lineCount > 1)
-        {
-            for (int i = 0; i < text.Length; i++)
-            {
-                if (text[i] == '\n')
-                {
-                    if (text[startIndex] != '\n')
-                    {
-                        lineInfoList.Add(new LineInfo(startIndex, i));
-                    }
-                    
-                    if (i + 1 == text.Length)
-                    {
-                        return lineInfoList;
-                    }
-                    else
-                    {
-                        startIndex = i + 1;
-                    }
-                }
-            }
-        }
-        
-        lineInfoList.Add(new LineInfo(startIndex, text.Length - 1));
-
-        return lineInfoList;
-    }
-
-    protected List<RenderInfo> GetRenderInfo()
-    {
-        List<RenderInfo> renderInfoList = new List<RenderInfo>();
-
-        for (int i = 0; i < LineInfoList.Count; i++)
-        {
-            if (LeftIndex >= LineInfoList[i].StartIndex && LeftIndex < LineInfoList[i].EndIndex)
-            {
-                renderInfoList.Add(new RenderInfo(LineInfoList[i], SpriteInfo));
-
-                break;
-            }
-        }
-
-        return renderInfoList;
-    }
-}

+ 0 - 12
Assets/TestText.cs.meta

@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 9a904f40657a1fc44ad84109ff8999c9
-timeCreated: 1490772216
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 3 - 3
MyLovelyGarden.Editor.csproj

@@ -15,7 +15,7 @@
     <TargetFrameworkProfile>Unity Full v3.5</TargetFrameworkProfile>
     <CompilerResponseFile></CompilerResponseFile>
     <UnityProjectType>Editor:5</UnityProjectType>
-    <UnityBuildTarget>Android:13</UnityBuildTarget>
+    <UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
     <UnityVersion>5.5.0f3</UnityVersion>
     <RootNamespace></RootNamespace>
     <LangVersion Condition=" '$(VisualStudioVersion)' != '10.0' ">4</LangVersion>
@@ -27,7 +27,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_ANDROID;ENABLE_SUBSTANCE;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;PLATFORM_SUPPORTS_ADS_ID;UNITY_CAN_SHOW_SPLASH_SCREEN;ENABLE_VIDEO;ENABLE_VR;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
+    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
     <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -37,7 +37,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_ANDROID;ENABLE_SUBSTANCE;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;PLATFORM_SUPPORTS_ADS_ID;UNITY_CAN_SHOW_SPLASH_SCREEN;ENABLE_VIDEO;ENABLE_VR;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
+    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
     <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>

+ 3 - 3
MyLovelyGarden.csproj

@@ -15,7 +15,7 @@
     <TargetFrameworkProfile>Unity Subset v3.5</TargetFrameworkProfile>
     <CompilerResponseFile></CompilerResponseFile>
     <UnityProjectType>Game:1</UnityProjectType>
-    <UnityBuildTarget>Android:13</UnityBuildTarget>
+    <UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
     <UnityVersion>5.5.0f3</UnityVersion>
     <RootNamespace></RootNamespace>
     <LangVersion Condition=" '$(VisualStudioVersion)' != '10.0' ">4</LangVersion>
@@ -27,7 +27,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_ANDROID;ENABLE_SUBSTANCE;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;PLATFORM_SUPPORTS_ADS_ID;UNITY_CAN_SHOW_SPLASH_SCREEN;ENABLE_VIDEO;ENABLE_VR;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
+    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
     <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -37,7 +37,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_ANDROID;ENABLE_SUBSTANCE;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;PLATFORM_SUPPORTS_ADS_ID;UNITY_CAN_SHOW_SPLASH_SCREEN;ENABLE_VIDEO;ENABLE_VR;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
+    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
     <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>

+ 13 - 16
MyLovelyGarden.sln

@@ -1,9 +1,9 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2008
-
-Project("{8A8BB0A8-D809-F2DF-89D6-F26151FFF558}") = "MyLovelyGarden", "Assembly-CSharp.csproj", "{21BB93BC-2239-D8F5-1219-201F8DCBAF49}"
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2015
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLovelyGarden", "MyLovelyGarden.csproj", "{9F3A3259-D53B-F6C8-8878-C5B99621035A}"
 EndProject
-Project("{8A8BB0A8-D809-F2DF-89D6-F26151FFF558}") = "MyLovelyGarden", "Assembly-CSharp-Editor.csproj", "{A08052E5-32CE-91C0-FF56-C60C901D6BEF}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLovelyGarden.Editor", "MyLovelyGarden.Editor.csproj", "{B575449E-FD9A-1672-368B-EC1E1252F6E4}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,19 +11,16 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Release|Any CPU.Build.0 = Release|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
-	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = Assembly-CSharp.csproj
-	EndGlobalSection
 EndGlobal

+ 0 - 5
MyLovelyGarden.txt

@@ -1,8 +1,3 @@
-能显示多个图片 图片能出现在任意位置
-
-TextPlus更具Alignment设置位置
-
-
 字体
 
 Anchor

BIN=BIN
ProjectSettings/GraphicsSettings.asset