Inheritance: MilkShakeFramework.Core.Scenes.Components.SceneComponent
Example #1
0
        public Scene()
        {
            SetScene(this);

            Listener = new SceneListener();

            AddNode(ComponentManager = new SceneComponentManager());
            ComponentManager.AddComponent(LoadManager = new LoadManager());
            ComponentManager.AddComponent(CameraManager = new CameraManager());
            ComponentManager.AddComponent(RenderManager = new RenderManager());

            // Change to alike of CameraManager?
            TweenerManager.Boot();

            MatrixStack = new MatrixStack();
            SceneColor = Color.White;
            ClearColor = Globals.ScreenColour;

            Effect = new BasicEffect(MilkShake.Graphics);
            Effect.View = Matrix.Identity;
            Effect.World = Matrix.Identity;
            Effect.Projection = Matrix.CreateOrthographic(MilkShake.Graphics.Viewport.Width, -MilkShake.Graphics.Viewport.Height, 1, -1);

            Effect.TextureEnabled = true;
        }
Example #2
0
        public Scene()
        {
            SetScene(this);

            mSceneListener = new SceneListener();
            mEventDispatcher = new EventDispatcher();

            mLoadManager = new LoadManager(this);
            mCameraManager = new CameraManager(this);
            mRenderManager = new RenderManager(this);

            TweenerManager.Boot();

            mComponentManager = new SceneComponentManager();

            ConvertUnits.SetDisplayUnitToSimUnitRatio(24f);
            mColor = Color.White;
            mClearColour = Globals.ScreenColour;
        }