// constructor
        public RollingCube(Level curLevel)
        {
            _curLevel = curLevel;
            _cubeMesh = _curLevel.GlobalCubeMesh;

            _cubeMoveSound = Audio.Instance.LoadFile("Assets/cube.ogg");
            _cubeMoveSound.Volume = 5;

            _cubeColor = new float3(1, 0.1f, 0.1f);

            PosCurXY = new int[2];
            PosLastXY = new int[2];

            _rotateYX = new float[2];
            _curDirXY = new int[2];

            _orientQuat = Quaternion.Identity;

            _posZ = 2;
            _veloZ = 0.0f;
            _curBright = 0.0f;

            ResetCube(0, 0);
        }
Пример #2
0
        // Init()
        public override void Init()
        {
            RC.ClearColor = new float4(0, 0, 0, 1);

            _shaderProgram = RC.CreateShader(Vs, Ps);
            RC.SetShader(_shaderProgram);

            _stereo3D = new Stereo3D(Stereo3DMode.Anaglyph, Width, Height);
            _stereo3D.AttachToContext(RC);

            _exampleLevel = new Level(RC, _shaderProgram, _stereo3D);
        }