Ejemplo n.º 1
0
    void Roteid()
    {
        var engle = -90f;

        if (oreintation == Oreintation.vertical)
        {
            oreintation = Oreintation.horizontal;
            engle       = -engle;
        }
        else
        {
            oreintation = Oreintation.vertical;
        }
        transform.Rotate(new Vector3(0, 0, engle), Space.Self);
    }
Ejemplo n.º 2
0
        public void Parse(String line)
        {
            char[]   charSeparators = new char[] { ' ' };
            String[] items          = line.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries);
            if (items.Length == Items)
            {
                bool CheckName = false;
                if ((items[0])[0] != 'F')
                {
                    throw new Exception("FX public class parse error. Another object.");
                }

                String toNum = items[0].Replace("F", "");
                FType = System.Convert.ToInt32(toNum);
                if (FType > 3)
                {
                    CheckName = true;
                }

                Reference  = items[1].Trim('"');
                Position.X = System.Convert.ToInt32(items[2]);
                Position.Y = System.Convert.ToInt32(items[3]);
                TextSize   = System.Convert.ToInt32(items[4]);
                Oreintation.Parse(items[5]);
                Visible.Parse(items[6]);
                HJustify.Parse(items[7]);
                VJustify.Parse(items[8]);
                if (CheckName)
                {
                    if (items.Length == Items + 1)
                    {
                        Name = items[9].Remove('"');
                    }
                    else
                    {
                        Name = "";
                    }
                }
            }
            else
            {
                throw new Exception("FX public class parse error. Unexpected number of items.");
            }
        }