////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public DemoEnvironment()
        {
            vHolds = new GameObject[Count];
            vCubes = new GameObject[Count];

            vOrbitMotion = new DemoMotion(10, 600);
            vSpinMotion  = new DemoMotion(45, 600);
            vBobMotion   = new DemoMotion(0.5f, 600);
            vGrowMotion  = new DemoMotion(0.5f, 600);

            vLightSpotAnim = new DemoAnimFloat(600);
            vCameraAnim    = new DemoAnimVector3(6000);
            vCameraRotAnim = new DemoAnimQuaternion(6000);

            vMotionMap = new Dictionary <MotionType, DemoMotion> {
                { MotionType.Orbit, vOrbitMotion },
                { MotionType.Spin, vSpinMotion },
                { MotionType.Bob, vBobMotion },
                { MotionType.Grow, vGrowMotion }
            };

            vCameraMap = new Dictionary <CameraPlacement, Vector3> {
                { CameraPlacement.Center, Vector3.zero },
                { CameraPlacement.Back, new Vector3(0, 0, 20) },
                { CameraPlacement.Top, new Vector3(0, 0, 20) }
            };

            vCameraRotMap = new Dictionary <CameraPlacement, Quaternion> {
                { CameraPlacement.Center, Quaternion.identity },
                { CameraPlacement.Back, Quaternion.identity },
                { CameraPlacement.Top, Quaternion.FromToRotation(Vector3.forward, Vector3.up) }
            };
        }
Пример #2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public DemoEnvironment()
        {
//			vHolds = new GameObject[Count];
//			vCubes = new GameObject[Count];

//			vOrbitMotion = new DemoMotion(10, 600);
//			vSpinMotion = new DemoMotion(45, 600);
//			vBobMotion = new DemoMotion(0.5f, 600);
//			vGrowMotion = new DemoMotion(0.5f, 600);

            vLightSpotAnim = new DemoAnimFloat(600);
            vCameraAnim    = new DemoAnimVector3(6000);
            vCameraRotAnim = new DemoAnimQuaternion(6000);

//			vMotionMap = new Dictionary<MotionType, DemoMotion> {
//				{ MotionType.Orbit,	vOrbitMotion },
//				{ MotionType.Spin,	vSpinMotion },
//				{ MotionType.Bob,	vBobMotion },
//				{ MotionType.Grow,	vGrowMotion }
//			};
        }