コード例 #1
0
        public override void LoadContent()
        {
            base.LoadContent();
            state       = STATE_BIRTH;
            maxDepth    = 2000;
            minDepth    = 0.001f;
            fieldOfView = MathHelper.PiOver4;
            viewPort    = Global.device.Viewport.AspectRatio;

            transparency = 0.3f;

            model = new GenericModelObject();
            model.LoadContent();
            model.model                   = Global.cameraModel;
            model.parent                  = this;
            model.Material.ambient        = 0.5f;
            model.Material.diffuse        = 0.5f;
            model.Material.shininess      = 0.1f;
            model.Material.matteColor     = Color.Green.ToVector4() / 10;
            model.Material.diffuseColor   = Color.Green.ToVector4();
            model.Material.diffuseColor.W = transparency;

            frustum = new Frustum();
            frustum.LoadContent();
            frustum.parent = this;

            friction = 0.985f;

            watch = new Stopwatch();
        }
コード例 #2
0
ファイル: Arrow.cs プロジェクト: NuCode1497/Netsky
        public override void LoadContent()
        {
            base.LoadContent();
            Face(Vector3.One);
            state = STATE_ACTIVE;

            shaft = new GenericModelObject();
            shaft.LoadContent();
            shaft.model  = Global.arrowShaft;
            shaft.parent = this;

            head = new GenericModelObject();
            head.LoadContent();
            head.model  = Global.arrowHead;
            head.parent = this;

            Material.ambient      = 0.2f;
            Material.diffuseColor = Color.Blue.ToVector4();
            Material.diffuse      = 1f;
            Material.shininess    = 1f;
            Material.matteColor   = Color.Cyan.ToVector4();
        }