상속: MilkShakeFramework.Core.Game.GameEntity
예제 #1
0
        public SceneView(Scene scene)
        {
            _scene = scene;

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

            InitializeComponent();
        }
예제 #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;
        }
예제 #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);
        }
예제 #4
0
 public ScriptComponent(Scene aScene)
     : base(aScene)
 {
     aScene.Listener.EntityAdded += new EntityEvent(EntityAdded);
 }
예제 #5
0
 public CameraManager(Scene scene)
     : base(scene)
 {
     mCurrentCamera = new Camera();
 }
예제 #6
0
 public static void AddScene(string key, Scene scene, LoadingScene loadingScene)
 {
 }
예제 #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);
        }
예제 #8
0
        public void SetScene(Scene scene)
        {
            mScene = scene;

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