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)); }
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); }
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; }
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); }
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)); }
public CollisionTestScene(SingularityGame game) : base(game, "collision-test", 10, -2, 0.1f) { }
public StartingScene(SingularityGame game, string start, int entranceID) : base(game, "startingScene|" + start + "|" + entranceID) { _start = start; _entranceId = entranceID; }
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); }
public LoadingScreen(SingularityGame game) : base(game) { }
public TransparencyTestScene(SingularityGame game) : base(game, "transparency", 2, 0, 0f) { this.SetAbsoluteCameraTarget(new Vector3()); this.SetCameraPosition(new Vector3(2, 2, 2)); }
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"); }
/// <summary> /// Initialize - gets called after construction /// </summary> /// <param name="game">SingularityGame</param> public virtual void Init(SingularityGame game) { Game = game; }
protected LoadingScreenTemplate(SingularityGame game) : base(game, "loadingScene") { }