Пример #1
0
 /// <summary>
 ///     Executes various actions on this event associated with a GameObject.
 /// </summary>
 /// <param name="gameObject">The GameObject</param>
 /// <param name="actionOnEventType"></param>
 /// <param name="transitionDuration"></param>
 /// <param name="curveInterpolation"></param>
 public void ExecuteAction(UnityEngine.GameObject gameObject, AkActionOnEventType actionOnEventType,
                           int transitionDuration, AkCurveInterpolation curveInterpolation)
 {
     if (IsValid())
     {
         var result = AkSoundEngine.ExecuteActionOnEvent(Id, actionOnEventType, gameObject, transitionDuration,
                                                         curveInterpolation);
         Verify(result);
     }
 }
Пример #2
0
    public void Stop(int _transitionDuration, AkCurveInterpolation _curveInterpolation)
    {
        if (eventID == (int)AkSoundEngine.AK_INVALID_UNIQUE_ID)
        {
            return;
        }

        AkSoundEngine.ExecuteActionOnEvent((uint)eventID, AkActionOnEventType.AkActionOnEventType_Stop, soundEmitterObject,
                                           _transitionDuration, _curveInterpolation);
    }
Пример #3
0
    public AKRESULT StopSound(uint eventID, GameObject gameObj        = null, int transitionDuration = 300,
                              AkCurveInterpolation curveInterpolation = AkCurveInterpolation.AkCurveInterpolation_Linear)
    {
        transitionDuration = Mathf.Clamp(transitionDuration, 0, 10000);
        if (gameObj == null)
        {
            gameObj = mGlobalObject;
        }
        AKRESULT result = AkSoundEngine.ExecuteActionOnEvent(eventID, AkActionOnEventType.AkActionOnEventType_Stop, gameObj, transitionDuration, curveInterpolation);

        return(result);
    }
Пример #4
0
        /// <summary>
        ///     Executes various actions on this event associated with a GameObject.
        /// </summary>
        /// <param name="gameObject">The GameObject</param>
        /// <param name="actionOnEventType"></param>
        /// <param name="transitionDuration"></param>
        /// <param name="curveInterpolation"></param>
        public void ExecuteAction(UnityEngine.GameObject gameObject, AkActionOnEventType actionOnEventType,
                                  int transitionDuration, AkCurveInterpolation curveInterpolation)
        {
            if (IsValid())
            {
#if AK_WWISE_ADDRESSABLES && UNITY_ADDRESSABLES
                var args     = new object[] { gameObject, actionOnEventType, transitionDuration, curveInterpolation };
                var argTypes = new System.Type[] { gameObject.GetType(), actionOnEventType.GetType(), transitionDuration.GetType(), curveInterpolation.GetType() };
                if (!AkAddressableBankManager.Instance.LoadedBankContainsEvent(Name, Id, this, "ExecuteAction", argTypes, args))
                {
                    return;
                }
#endif

                var result = AkSoundEngine.ExecuteActionOnEvent(Id, actionOnEventType, gameObject, transitionDuration,
                                                                curveInterpolation);
                Verify(result);
            }
        }
Пример #5
0
  public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve) {
    
		uint tempin_gameObjectID;
		if ( in_gameObjectID != null )
		{
			tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_gameObjectID.GetComponent<AkGameObject>() == null)
			{
				in_gameObjectID.AddComponent<AkGameObject>();
			}
		}
		else
		{
			tempin_gameObjectID = unchecked((uint)-1);
		}
		
		
    {
      AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_6(in_pszEventName, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve);

      return ret;
    }
  }
Пример #6
0
  public static AKRESULT ResetRTPCValue(string in_pszRtpcName, UnityEngine.GameObject in_gameObjectID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve) {
    
		uint tempin_gameObjectID;
		if ( in_gameObjectID != null )
		{
			tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_gameObjectID.GetComponent<AkGameObject>() == null)
			{
				in_gameObjectID.AddComponent<AkGameObject>();
			}
		}
		else
		{
			tempin_gameObjectID = unchecked((uint)-1);
		}
		
		
    {
      AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ResetRTPCValue__SWIG_4(in_pszRtpcName, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve);

      return ret;
    }
  }
    public static AKRESULT SetRTPCValue(uint in_rtpcID, float in_value, UnityEngine.GameObject in_gameObjectID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve, bool in_bBypassInternalValueInterpolation)
    {
        uint tempin_gameObjectID;
        if ( in_gameObjectID != null && in_gameObjectID.activeInHierarchy )
        {
            tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
            // Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
            if (in_gameObjectID.GetComponent<AkGameObj>() == null)
            {
                in_gameObjectID.AddComponent<AkGameObj>();
            }
        }
        else
        {
            tempin_gameObjectID = unchecked((uint)-1);
        }

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_SetRTPCValue__SWIG_0(in_rtpcID, in_value, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve, in_bBypassInternalValueInterpolation);

          return ret;
        }
    }
Пример #8
0
 public void Stop(int _transitionDuration, AkCurveInterpolation _curveInterpolation = AkCurveInterpolation.AkCurveInterpolation_Linear)
 {
     AkSoundEngine.ExecuteActionOnEvent((uint)eventID, AkActionOnEventType.AkActionOnEventType_Stop, soundEmitterObject, _transitionDuration, _curveInterpolation);
 }
Пример #9
0
 public AKRESULT StopSound(string eventName, GameObject gameObj = null, int transitionDuration = 300, AkCurveInterpolation curveInterpolation = AkCurveInterpolation.AkCurveInterpolation_Linear)
 {
     if (!CheckAndLoadBank(eventName))
     {
         return(AKRESULT.AK_Fail);
     }
     if (!string.IsNullOrEmpty(eventName))
     {
         transitionDuration = Mathf.Clamp(transitionDuration, 0, 10000);
         if (gameObj == null)
         {
             gameObj = mGlobalObject;
         }
         if (gameObj != null)
         {
             AKRESULT result = AkSoundEngine.ExecuteActionOnEvent(eventName, AkActionOnEventType.AkActionOnEventType_Stop, gameObj, transitionDuration, curveInterpolation);
             return(result);
         }
     }
     return(AKRESULT.AK_Fail);
 }
Пример #10
0
 public void Stop(int _transitionDuration, AkCurveInterpolation _curveInterpolation)
 {
     data.Stop(soundEmitterObject, _transitionDuration, _curveInterpolation);
 }
Пример #11
0
    public static AKRESULT ResetRTPCValue(uint in_rtpcID, UnityEngine.GameObject in_gameObjectID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve, bool in_bBypassInternalValueInterpolation)
    {
        AkAutoObject tempObj = null;
        uint tempin_gameObjectID = (uint)AutoRegisterAkGameObj(in_gameObjectID, ref tempObj);

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ResetRTPCValue__SWIG_0(in_rtpcID, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve, in_bBypassInternalValueInterpolation);

          return ret;
        }
    }
Пример #12
0
    public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve)
    {
        AkAutoObject tempObj = null;
        uint tempin_gameObjectID;
        if ( in_gameObjectID != null )
        {
            tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
            if (in_gameObjectID.activeInHierarchy)
            {
                if (in_gameObjectID.GetComponent<AkGameObj>() == null)
                {
                    in_gameObjectID.AddComponent<AkGameObj>();
                }
            }
            else
            {
                //Object not active. AkGameObj will not work.  Use a temporary game object.
                //This will automatically unregister at the end of this scope.
                tempObj = new AkAutoObject(in_gameObjectID);
                tempin_gameObjectID = (uint)tempObj.m_id;	//Silence warning
            }
        }
        else
        {
            tempin_gameObjectID = unchecked((uint)-1);
        }

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_6(in_pszEventName, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve);

          return ret;
        }
    }
Пример #13
0
    public static AKRESULT SetRTPCValue(string in_pszRtpcName, float in_value, UnityEngine.GameObject in_gameObjectID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve, bool in_bBypassInternalValueInterpolation)
    {
        AkAutoObject tempObj = null;
        uint tempin_gameObjectID;
        if ( in_gameObjectID != null )
        {
            tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
            if (in_gameObjectID.activeInHierarchy)
            {
                if (in_gameObjectID.GetComponent<AkGameObj>() == null)
                {
                    in_gameObjectID.AddComponent<AkGameObj>();
                }
            }
            else
            {
                //Object not active. AkGameObj will not work.  Use a temporary game object.
                //This will automatically unregister at the end of this scope.
                tempObj = new AkAutoObject(in_gameObjectID);
                tempin_gameObjectID = (uint)tempObj.m_id;	//Silence warning
            }
        }
        else
        {
            tempin_gameObjectID = unchecked((uint)-1);
        }

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_SetRTPCValue__SWIG_5(in_pszRtpcName, in_value, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve, in_bBypassInternalValueInterpolation);

          return ret;
        }
    }
Пример #14
0
    public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType, ComponentBind.Entity in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve)
    {
        uint tempin_gameObjectID;
                if ( in_gameObjectID != null )
                {
                        tempin_gameObjectID = getGameObjectID(in_gameObjectID);
                        // Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
                        if (in_gameObjectID.Get<AkGameObject>() == null)
                        {
                                in_gameObjectID.Add(new AkGameObject());
                        }
                }
                else
                {
                        tempin_gameObjectID = unchecked((uint)-1);
                }

        {
            AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_1(in_eventID, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve);

            return ret;
        }
    }
Пример #15
0
    public static AKRESULT SetRTPCValue(string in_pszRtpcName, float in_value, ComponentBind.Entity in_gameObjectID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve)
    {
        uint tempin_gameObjectID;
                if ( in_gameObjectID != null )
                {
                        tempin_gameObjectID = getGameObjectID(in_gameObjectID);
                        // Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
                        if (in_gameObjectID.Get<AkGameObject>() == null)
                        {
                                in_gameObjectID.Add(new AkGameObject());
                        }
                }
                else
                {
                        tempin_gameObjectID = unchecked((uint)-1);
                }

        {
            AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_SetRTPCValue__SWIG_4(in_pszRtpcName, in_value, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve);

            return ret;
        }
    }
Пример #16
0
    public void Stop(int _transitionDuration, AkCurveInterpolation _curveInterpolation = AkCurveInterpolation.AkCurveInterpolation_Linear)
    {
#if !DISABLE_AKSOUNDENGINE
        AkSoundEngine.ExecuteActionOnEvent((uint)eventID, AkActionOnEventType.AkActionOnEventType_Stop, soundEmitterObject, _transitionDuration, _curveInterpolation);
#endif
    }
Пример #17
0
 public void Stop(UnityEngine.GameObject gameObject, int transitionDuration = 0,
                  AkCurveInterpolation curveInterpolation = AkCurveInterpolation.AkCurveInterpolation_Linear)
 {
     ExecuteAction(gameObject, AkActionOnEventType.AkActionOnEventType_Stop, transitionDuration, curveInterpolation);
 }
Пример #18
0
 /// <summary>
 /// Executes various actions on this event associated with a GameObject.
 /// </summary>
 /// <param name="gameObject">The GameObject</param>
 /// <param name="actionOnEventType"></param>
 /// <param name="transitionDuration"></param>
 /// <param name="curveInterpolation"></param>
 public void ExecuteAction(GameObject gameObject, AkActionOnEventType actionOnEventType, int transitionDuration, AkCurveInterpolation curveInterpolation)
 {
     if (IsValid())
     {
         AKRESULT result = AkSoundEngine.ExecuteActionOnEvent(GetID(), actionOnEventType, gameObject, transitionDuration, curveInterpolation);
         Verify(result);
     }
 }
Пример #19
0
  public static AKRESULT DynamicSequenceStop(uint in_playingID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve) {
    AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_DynamicSequenceStop__SWIG_0(in_playingID, in_uTransitionDuration, (int)in_eFadeCurve);

    return ret;
  }
Пример #20
0
    public static AKRESULT SetRTPCValue(string in_pszRtpcName, float in_value, UnityEngine.GameObject in_gameObjectID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve)
    {
        AkAutoObject tempObj = null;
        uint tempin_gameObjectID = (uint)AutoRegisterAkGameObj(in_gameObjectID, ref tempObj);

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_SetRTPCValue__SWIG_6(in_pszRtpcName, in_value, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve);

          return ret;
        }
    }
Пример #21
0
        public void Stop(GameObject gameObject, int transitionDuration = 0, AkCurveInterpolation curveInterpolation = AkCurveInterpolation.AkCurveInterpolation_Linear)
        {
#if !DISABLE_AKSOUNDENGINE
            ExecuteAction(gameObject, AkActionOnEventType.AkActionOnEventType_Stop, transitionDuration, curveInterpolation);
#endif
        }
Пример #22
0
  public static void StopPlayingID(uint in_playingID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve) {
    AkSoundEnginePINVOKE.CSharp_StopPlayingID__SWIG_0(in_playingID, in_uTransitionDuration, (int)in_eFadeCurve);

  }
Пример #23
0
    public static AKRESULT SetRTPCValueByPlayingID(uint in_rtpcID, float in_value, uint in_playingID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve, bool in_bBypassInternalValueInterpolation)
    {
        AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_SetRTPCValueByPlayingID__SWIG_0(in_rtpcID, in_value, in_playingID, in_uValueChangeDuration, (int)in_eFadeCurve, in_bBypassInternalValueInterpolation);

        return ret;
    }
Пример #24
0
  public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve) {
    
		uint tempin_gameObjectID;
		if ( in_gameObjectID != null )
		{
			tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_gameObjectID.GetComponent<AkGameObject>() == null)
			{
				in_gameObjectID.AddComponent<AkGameObject>();

				// Note: We have missed AkGameObject.Awake() of this run to register. 
				// So we take over its work by inlining it here.
				AkSoundEngine.RegisterGameObj(in_gameObjectID, in_gameObjectID.name);
			
				//Set the original position
				AkSoundEngine.SetObjectPosition(
		            in_gameObjectID, 
		            in_gameObjectID.transform.position.x, 
		            in_gameObjectID.transform.position.y, 
		            in_gameObjectID.transform.position.z, 
		            in_gameObjectID.transform.forward.x,
		            in_gameObjectID.transform.forward.y, 
		            in_gameObjectID.transform.forward.z
		        	);
			}
		}
		else
		{
			tempin_gameObjectID = unchecked((uint)-1);
		}
		
		
    {
      AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_1(in_eventID, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve);

      return ret;
    }
  }
Пример #25
0
    public static AKRESULT SetRTPCValueByPlayingID(string in_pszRtpcName, float in_value, uint in_playingID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve)
    {
        AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_SetRTPCValueByPlayingID__SWIG_5(in_pszRtpcName, in_value, in_playingID, in_uValueChangeDuration, (int)in_eFadeCurve);

        return ret;
    }
Пример #26
0
 public void Stop(int _transitionDuration, AkCurveInterpolation _curveInterpolation = AkCurveInterpolation.AkCurveInterpolation_Linear)
 {
     AkSoundEngine.ExecuteActionOnEvent((uint)eventID, AkActionOnEventType.AkActionOnEventType_Stop, soundEmitterObject, _transitionDuration, _curveInterpolation);
 }
Пример #27
0
    public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve)
    {
        AkAutoObject tempObj = null;
        uint tempin_gameObjectID = (uint)AutoRegisterAkGameObj(in_gameObjectID, ref tempObj);

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_6(in_pszEventName, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve);

          return ret;
        }
    }