public SceneView(Scene scene) { _scene = scene; _scene.Listener.EntityAdded += (node) => Update(); _scene.Listener.EntityRemoved += (node) => Update(); InitializeComponent(); }
public ParticlesComponent(Scene aScene) : base(aScene) { Scene.Listener.EntityAdded += new EntityEvent(Listener_EntityAdded); Scene.Listener.PostDraw[DrawLayer.First] += new DrawEvent(Draw); Scene.Listener.Update += new UpdateEvent(Listener_Update); Scene.Listener.LoadContent += new BasicEvent(LoadConent); mSpriteBatchRenderer = new SpriteBatchRenderer(); mSpriteBatchRenderer.GraphicsDeviceService = MilkShake.GraphicsManager; }
public LightingComponent(Scene mScene, LightMapSize mLightMapSize = LightMapSize.Full, int mBluriness = 0) : base(mScene) { mLight = new KryptonEngine(MilkShake.Game, "KryptonEffect"); mLight.Initialize(); // [Settings] mLight.LightMapSize = mLightMapSize; mLight.Bluriness = mBluriness; // [Events] Scene.Listener.PreDraw[DrawLayer.First] += new DrawEvent(PreDraw); Scene.Listener.PostDraw[DrawLayer.Fourth] += new DrawEvent(PostDraw); }
public ScriptComponent(Scene aScene) : base(aScene) { aScene.Listener.EntityAdded += new EntityEvent(EntityAdded); }
public CameraManager(Scene scene) : base(scene) { mCurrentCamera = new Camera(); }
public static void AddScene(string key, Scene scene, LoadingScene loadingScene) { }
public static void AddScene(string key, Scene scene) { if (mScenes.ContainsKey(key)) throw new Exception("Screen name already exists."); mScenes.Add(key, scene); }
public void SetScene(Scene scene) { mScene = scene; foreach (Entity entity in Nodes) entity.SetScene(scene); }
public RenderManager(Scene scene) : base(scene) { mSpriteBatch = new SpriteBatch(MilkShake.Graphics); mSamplerState = SamplerState; }
public LoadManager(Scene scene) : base(scene) { mLoadQueue = new Queue<Entity>(); mSceneLoaded = false; }