コード例 #1
0
ファイル: Scene.cs プロジェクト: MartinMcGuinness/TheLastDawn
        //SpriteFont debugfont;
        public Scene(Game game)
            : base(game)
        {
            World = new World(new Vector2(0, 18));
            PhysicsDebug = new DebugViewXNA(World);
            InputManager = new InputManager(Game);
            Transitioner = new Transitioner(Game, this);
            #if !FINAL_RELEASE
            SelectionManager = new SelectionManager(Game, this);
            #endif
            SceneLoader = new SceneLoader(Game);
            Camera = new Camera(Game, this);
            GarbageElements = new SortedList<Element>();
            RespawnElements = new SortedList<Element>();
            Elements = new SortedList<Element>();

            PhysicsDebug.Enabled = false;
            SelectionManager.ShowEmblems = false;
            Kinect.ColorStream.Enable();
            Kinect.DepthStream.Enable();
            Kinect.SkeletonStream.Enable();
            Kinect.Start();

            //SelectionManager.ShowForm = false;
        }
コード例 #2
0
ファイル: EditorBase.cs プロジェクト: Nessphoro/VelesConflict
 /// <summary>
 /// 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.
 /// </summary>
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here
     Camera = new Camera();
     Camera.Position = new Vector2(GraphicsDevice.Viewport.Width/2, GraphicsDevice.Viewport.Height/2);
     Camera.Zoom = 1f;
     Camera.Rotation = 0f;
     remoteWorker = new RemoteWorker(null);
     remoteWorker.Run();
     base.Initialize();
 }
コード例 #3
0
ファイル: EditorBase.cs プロジェクト: Nessphoro/VelesConflict
 public void Reset()
 {
     lock (Planets)
         Planets.Clear();
     if (defaultConnection != null && !defaultConnection.Dead)
     {
         string Command = string.Format("+CLEAR\n");
         defaultConnection.Write(Command);
     }
     MapWidth = 800;
     MapHeight = 480;
     NextID = 0;
     Camera = new Camera();
     Camera.Position = new Vector2(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2);
     Camera.Zoom = 1f;
     Camera.Rotation = 0f;
     Chance = MathHelper.Lerp(0.1f, 0.6f, (float)rnd.NextDouble());
     RefreshLine();
 }