Inheritance: MilkShakeFramework.Core.Game.GameEntity
Example #1
0
        public SceneView(Scene scene)
        {
            _scene = scene;

            _scene.Listener.EntityAdded += (node) => Update();
            _scene.Listener.EntityRemoved += (node) => Update();

            InitializeComponent();
        }
Example #2
0
        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;
        }
Example #3
0
        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);
        }
Example #4
0
 public ScriptComponent(Scene aScene)
     : base(aScene)
 {
     aScene.Listener.EntityAdded += new EntityEvent(EntityAdded);
 }
Example #5
0
 public CameraManager(Scene scene)
     : base(scene)
 {
     mCurrentCamera = new Camera();
 }
Example #6
0
 public static void AddScene(string key, Scene scene, LoadingScene loadingScene)
 {
 }
Example #7
0
        public static void AddScene(string key, Scene scene)
        {
            if (mScenes.ContainsKey(key)) throw new Exception("Screen name already exists.");

            mScenes.Add(key, scene);
        }
Example #8
0
        public void SetScene(Scene scene)
        {
            mScene = scene;

            foreach (Entity entity in Nodes) entity.SetScene(scene);
        }
Example #9
0
 public RenderManager(Scene scene)
     : base(scene)
 {
     mSpriteBatch = new SpriteBatch(MilkShake.Graphics);
     mSamplerState = SamplerState;
 }
Example #10
0
 public LoadManager(Scene scene)
     : base(scene)
 {
     mLoadQueue = new Queue<Entity>();
     mSceneLoaded = false;
 }