Esempio n. 1
0
        public static SprEnt2 LoadSpriteFromFile(BinaryReader br, IConnectable2 Parent, double xPos, double yPos)
        {
            SprEnt2 spr = LoadSpriteFromFile(br, xPos, yPos);

            Parent.AddConnection(spr);

            return(spr);
        }
Esempio n. 2
0
        public static SprEnt2 LoadSpriteFromFile(BinaryReader br, double xPos, double yPos)
        {
            SprEnt2 spr = LoadSpriteFromFile(br);

            spr.SetPosition(xPos, yPos);

            return(spr);
        }
Esempio n. 3
0
        public static SprEnt2 LoadSpriteFromFile(BinaryReader br)
        {
            SprEnt2 spr = new SprEnt2(Vec2Utils.LoadVec2iFromFile(br));

            for (int y = 0; y < spr.GetSize().Y; ++y)
            {
                for (int x = 0; x < spr.GetSize().X; ++x)
                {
                    //Hmm... it sure do be like that, yes... interesting
                    spr.SetAt(BitConverter.ToChar(br.ReadBytes(2), 0), x, y);
                    spr.SetColorAt((ConsoleColor)br.ReadUInt16(), x, y);
                }
            }

            return(spr);
        }