コード例 #1
0
ファイル: Game1.cs プロジェクト: Lambosaurus/StarPixel
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        protected override void Initialize()
        {
            base.Initialize();
            
            universe = new Universe();

            ui = new UI(GraphicsDevice, spriteBatch, window_res_x, window_res_y);
            ui.Start();
            ui.FocusUniverse(universe);

            universe.Start();
            
            universe.Update(); // this is a shitty way of making the below work
            if (universe.physicals.Count != 0)
            {
                if ((Ship)universe.physicals[0] is Ship)
                {
                    ui.FocusPhys((Ship)universe.physicals[0]);
                    //ui.GiveHumanAIHandle((IntellegenceHuman)(((Ship)universe.physicals[0]).ai));
                }
            }
            
            

        }
コード例 #2
0
ファイル: Widget.cs プロジェクト: Lambosaurus/StarPixel
 public WidgetCamera( UI arg_ui, RenderCamera arg_camera) : base(arg_camera, 1.0f)
 {
     ui = arg_ui;
 }