コード例 #1
0
        public override void Deserialize(StreamReader SR)
        {
            //SR.ReadLine();

            base.Deserialize(SR);

            char[] IsThisNull = new char[4];
            SR.Read(IsThisNull, 0, 4);

            if (IsThisNull.ToString() != "null")
            {
                Sprite = new Sprite(gameObject.Transform);
                Sprite.Deserialize(SR);
            }

            SpriteEffects = (SpriteEffects)System.Enum.Parse(SpriteEffects.GetType(), SR.ReadLine().Split('\t')[1]); //Test this
            string[] COLOR = SR.ReadLine().Split('\t');
            Color = new Color(byte.Parse(COLOR[1]), byte.Parse(COLOR[2]), byte.Parse(COLOR[3]), byte.Parse(COLOR[4]));
            string[] effect = SR.ReadLine().Split('\t');
            if (effect[1] == "null")
            {
                Effect = null;
            }
            else
            {
                Effect = Setup.Content.Load <Effect>(effect[1]);
            }

            SR.ReadLine();
        }