Example #1
0
        /// <param name="screenPosition">The position on screen to play at. This is not adjusted for where the user is looking.</param>
        public static void RaiseEvent(string eventPath, string parameterName, int value, Point2D screenPosition)
        {
            _System.getEvent(eventPath, out EventDescription _event);
            _event.createInstance(out EventInstance instance);

            if (parameterName != string.Empty)
            {
                instance.setParameterValue(parameterName, value);
            }

            _3D_ATTRIBUTES attributes = new _3D_ATTRIBUTES();

            attributes.forward.z = 1.0f;
            attributes.up.y      = 1.0f;

            attributes.forward.y = 1.0f;
            attributes.up.z      = 1.0f;

            attributes.position.x = screenPosition.X;
            attributes.position.y = screenPosition.Y;

            instance.set3DAttributes(attributes);
            instance.start();
            instance.release();
        }
Example #2
0
        internal static void Update()
        {
            Point2D camera = RenderInfo.GetCameraCenter();

            _3D_ATTRIBUTES attributes = new _3D_ATTRIBUTES();

            attributes.forward.z  = RenderInfo.Camera2D.Zoom;
            attributes.up.y       = 1.0f;
            attributes.position.x = camera.X;
            attributes.position.y = camera.Y;

            System.setListenerAttributes(0, attributes);

            System.update();
        }
        public static void RaiseEvent(string eventPath, string parameterName, int value, Point2D screenPosition)
        {
            _System.getEvent(eventPath, out EventDescription _event);
            _event.createInstance(out EventInstance instance);
            instance.setParameterValue(parameterName, value);

            _3D_ATTRIBUTES attributes = new _3D_ATTRIBUTES();

            attributes.forward.z  = 1.0f;
            attributes.up.y       = 1.0f;
            attributes.position.x = screenPosition.X;
            attributes.position.z = screenPosition.Y;
            instance.setProperty(EVENT_PROPERTY.MINIMUM_DISTANCE, 300);
            instance.setProperty(EVENT_PROPERTY.MAXIMUM_DISTANCE, 1600);

            instance.set3DAttributes(attributes);
            instance.start();
        }
 public RESULT set3DAttributes(_3D_ATTRIBUTES attributes)
 {
     return FMOD_Studio_EventInstance_Set3DAttributes(rawPtr, ref attributes);
 }
 private static extern RESULT FMOD_Studio_EventInstance_Set3DAttributes(IntPtr _event, ref _3D_ATTRIBUTES attributes);
 public RESULT setListenerAttributes(_3D_ATTRIBUTES attributes)
 {
     return FMOD_Studio_System_SetListenerAttributes(rawPtr, ref attributes);
 }
 private static extern RESULT FMOD_Studio_System_SetListenerAttributes(IntPtr studiosystem, ref _3D_ATTRIBUTES attributes);
Example #8
0
 public RESULT get3DAttributes(out _3D_ATTRIBUTES attributes)
 {
     return FMOD_Studio_EventInstance_Get3DAttributes(rawPtr, out attributes);
 }
Example #9
0
 public RESULT getListenerAttributes(out _3D_ATTRIBUTES attributes)
 {
     return FMOD_Studio_System_GetListenerAttributes(rawPtr, out attributes);
 }
 private static extern RESULT FMOD_Studio_System_GetListenerAttributes(IntPtr studiosystem, int listener, out _3D_ATTRIBUTES attributes);
 private static extern RESULT FMOD_Studio_EventInstance_Set3DAttributes(IntPtr _event, ref _3D_ATTRIBUTES attributes);
 public RESULT set3DAttributes(_3D_ATTRIBUTES attributes)
 {
     return(FMOD_Studio_EventInstance_Set3DAttributes(rawPtr, ref attributes));
 }
 private static extern RESULT FMOD_Studio_System_SetListenerAttributes(IntPtr studiosystem, ref _3D_ATTRIBUTES attributes);
 public RESULT setListenerAttributes(_3D_ATTRIBUTES attributes)
 {
     return(FMOD_Studio_System_SetListenerAttributes(rawPtr, ref attributes));
 }