Example #1
0
        public override void OnAdd(Scene scene)
        {
            base.OnAdd(scene);

            renderView = new MainRenderView(scene, Matrix.Identity, Matrix.Identity, Vector3.Zero, 1.0f, 1000);

            scene.MainCamera = renderView;
            scene.AddRenderView(renderView);

            fieldOfView = MathHelper.ToRadians(60);
            aspectRatio = GFX.Inst.DisplayRes.X / GFX.Inst.DisplayRes.Y;
        }
Example #2
0
        public override void OnAdd(Scene scene)
        {
            if (castsShadows)
            {
                for (int i = 0; i < renderViews.Length; i++)
                {
                    scene.AddRenderView(renderViews[i]);
                }
            }

            base.OnAdd(scene);
        }
Example #3
0
        public override void OnAdd(Scene scene)
        {
            base.OnAdd(scene);

            this.team = 0;
            this.lives = DEFAULT_PLAYER_LIVES;
            renderView = new MainRenderView(scene, Matrix.Identity, Matrix.Identity, Vector3.Zero, 1.0f, 1000);

            ResetStates();
            scene.MainCamera = renderView;
            scene.AddRenderView(renderView);

            fieldOfView = MathHelper.ToRadians(70);
            aspectRatio = GFX.Inst.DisplayRes.X / GFX.Inst.DisplayRes.Y;

            ResetStates();
        }
Example #4
0
        public override void OnAdd(Scene scene)
        {
            addedToScene = true;
            if (castsShadows)
            {
                for (int i = 0; i < renderViews.Length; i++)
                {
                    scene.AddRenderView(renderViews[i]);
                }
            }

            if (isMainLight)
                scene.MainLight = this;

            base.OnAdd(scene);
        }