コード例 #1
0
        public LightTestScene(SingularityGame game) : base(game, "light", 4096)
        {
            this.SetLightDirection(new Vector3(-7, -4, -7));

            this.SetProjectionMatrix(Matrix.CreateOrthographic(120, 120, 0.01f, 256.0f));
            this.SetAbsoluteCamera(new Vector3(-20, 20, 20), new Vector3(0, 0, 0));
        }
コード例 #2
0
 public RayTestScene(SingularityGame game, string sceneKey) : base(game, sceneKey, 8, 2, 0.0f)
 {
     this.ScenePauseEvent += (sender, args) =>
     {
         this.LastMouseX = Mouse.GetState().X;
         this.LastMouseY = Mouse.GetState().Y;
     };
     this.SceneResumeEvent += (sender, args) => Mouse.SetPosition(LastMouseX, LastMouseY);
 }
コード例 #3
0
 public static void SetUp <TLoadingScene>(Assembly currentAssembly, SingularityGame game)
     where TLoadingScene : LoadingScreenTemplate
 {
     _loadingKey =
         SceneManager.RegisterScene((GameScene)Activator.CreateInstance(typeof(TLoadingScene), game));
     _scriptList      = new Dictionary <string, ScriptData>();
     _runningAssembly = currentAssembly;
     _game            = game;
     _isSetUp         = true;
 }
コード例 #4
0
ファイル: ScriptScene.cs プロジェクト: imthe666st/Singularity
 public ScriptScene(SingularityGame game, string path, ScriptingTemplate script)
     : base(game,
            path,
            sceneSize: script.GetSettings().SceneSize == null ? 16 : script.GetSettings().SceneSize.Value,
            minPartition: script.GetSettings().MinPartition == null ? 2 : script.GetSettings().MinPartition.Value,
            precision: script.GetSettings().Precision == null ? 0f : script.GetSettings().Precision.Value)
 {
     _scriptKey = path;
     Script     = script;
     Script.Init(game);
 }
コード例 #5
0
        public TestScene(SingularityGame game) : base(game, "test", 4096)
        {
            //this.SetCamera(new Vector3(0, 0, 0), new Vector3(0, 0, 1));
            this.SceneResumeEvent += (s, e) => { Mouse.SetPosition(200, 200); };


            this.SetLightPosition(new Vector3(-50, 50, 0));
            this.SetLightDirection(new Vector3(1, -1, 0));

            this.SetProjectionMatrix(Matrix.CreateOrthographic(100, 100, 0.01f, 200f));
        }
コード例 #6
0
 public CollisionTestScene(SingularityGame game) : base(game, "collision-test", 10, -2, 0.1f)
 {
 }
コード例 #7
0
 public StartingScene(SingularityGame game, string start, int entranceID) : base(game, "startingScene|" + start + "|" + entranceID)
 {
     _start      = start;
     _entranceId = entranceID;
 }
コード例 #8
0
 public ShaderTestScene(SingularityGame game) : base(game, "shadertest")
 {
     this.SetCameraTarget(new Vector3(1, 0, 0));
     this.SetCameraPosition(new Vector3(0, 0, 0));
     this.SetCullingDistance(0.01f, 5.0f);
 }
コード例 #9
0
 public LoadingScreen(SingularityGame game) : base(game)
 {
 }
コード例 #10
0
 public TransparencyTestScene(SingularityGame game) : base(game, "transparency", 2, 0, 0f)
 {
     this.SetAbsoluteCameraTarget(new Vector3());
     this.SetCameraPosition(new Vector3(2, 2, 2));
 }
コード例 #11
0
 protected LightGameScene(SingularityGame game, string sceneKey, int shadowMapQuality, int sceneSize = 16, int minPartition = 2, float precision = 0) : base(game, sceneKey, sceneSize, minPartition, precision)
 {
     this.ShadowTarget2D          = new RenderTarget2D(game.GraphicsDevice, shadowMapQuality, shadowMapQuality);
     this.ShadowMapGenerateEffect = game.Content.Load <Effect>("effects/GenerateShadowMap");
 }
コード例 #12
0
 /// <summary>
 /// Initialize - gets called after construction
 /// </summary>
 /// <param name="game">SingularityGame</param>
 public virtual void Init(SingularityGame game)
 {
     Game = game;
 }
コード例 #13
0
 protected LoadingScreenTemplate(SingularityGame game) : base(game, "loadingScene")
 {
 }