コード例 #1
0
ファイル: Program.cs プロジェクト: Gayo/XNAVERGE
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (SullyGame game = new SullyGame())
     {
         game.Run();
     }
 }
コード例 #2
0
ファイル: Textbox.cs プロジェクト: Gayo/XNAVERGE
        public Textbox( int screen_width, int screen_height, Texture2D speechPorts, SullyGame g )
        {
            game = g;
            boxes_of_text = new List<object>();
            currently_rendering_text = new List<string>();
            vertical_padding = 2;
            horizontal_padding = 7;
            long_step = 2;
            short_step = 1;

            full_reset();

            //textbox.image = Content.Load<Texture2D>( "textbox" );

            image = _.MakeBox( 317, 50, _.sg.boxcolors );

            speechPortraits = speechPorts;

            bounds = new Rectangle( 0, 0, image.Width, image.Height );

            int yloc = screen_height - bounds.Height - 4;

            bounds.Offset( ( screen_width - bounds.Width ) / 2, yloc );

            speech_bounds = new Rectangle( 2, yloc - 33, 32, 32 );

            inner_bounds = bounds; // copy value
            color_bounds = bounds;
            inner_bounds.Inflate( -horizontal_padding, -vertical_padding );
            color_bounds.Inflate( -2, -2 );

            bgColor = new Texture2D( _.sg.GraphicsDevice, 1, 1, false, SurfaceFormat.Color );
            bgColor.SetData(new[] { new Color(140, 0, 140) });

            McgLayer l = game.renderstack.GetLayer( "textbox" );

            RenderDelegate a1 = ( int x, int y ) => {
                //game.spritebatch.Draw( inactiveBgColor, mainBox.color_bounds, Color.White * .5f );
                //game.spritebatch.Draw( mainBox.image, mainBox.bounds, Color.White );
                Draw();
            };

            l.AddNode(
                new McgNode( a1, l, 0, 0, 300, 300, 3000 )
            );
        }
コード例 #3
0
ファイル: Box.cs プロジェクト: Gayo/XNAVERGE
 private static void initBox(SullyGame sg)
 {
     PrimitiveVertexDeclaration = new VertexDeclaration(
         new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0),
         new VertexElement(8, VertexElementFormat.Color, VertexElementUsage.Color, 0)
     );
     PrimitiveEffect = new BasicEffect(sg.GraphicsDevice);
 }
コード例 #4
0
ファイル: Util.cs プロジェクト: Gayo/XNAVERGE
        public static void init( SullyGame sg )
        {
            _.sg = sg;
            _.flags = new int[NUM_FLAGS];
            _.pixel = new Texture2D( _.sg.GraphicsDevice, 1, 1, false, SurfaceFormat.Color );
            _.pixel.SetData(new[] { new Color(255, 255, 255) });

            initBox(sg);
        }
コード例 #5
0
ファイル: SaveManager.cs プロジェクト: Gayo/XNAVERGE
 public SaveManager(SullyGame game)
 {
     this.game = game;
     headers = new List<SaveHeader>();
     read_headers();
 }
コード例 #6
0
ファイル: SullyGlobalScripts.cs プロジェクト: Gayo/XNAVERGE
 public SullyGlobalScripts( SullyGame sg )
 {
     this.sg = sg;
 }