Ejemplo n.º 1
0
 public void createDuplication(UnityEngine.GameObject Item)
 {
     Item item = Item.GetComponent<ItemOnObject>().item;
     UnityEngine.GameObject duplication = UnityEngine.GameObject.FindGameObjectWithTag("MainInventory").GetComponent<Inventory>().addItemToInventory(item.itemID, item.itemValue);
     duplication.transform.parent.parent.parent.GetComponent<Inventory>().stackableSettings();
     Item.GetComponent<ConsumeItem>().duplication = duplication;
     duplication.GetComponent<ConsumeItem>().duplication = Item;
 }
Ejemplo n.º 2
0
    public void HandleCustomProperties(UnityEngine.GameObject gameObject,
	                                   IDictionary<string, string> props)
    {
        // Simply add a component to our GameObject
        if (props.ContainsKey ("PrefabPath")) {
            string path = props["PrefabPath"];
            UnityEngine.Object spawn =
                AssetDatabase.LoadAssetAtPath(path, typeof(GameObject));
            if (spawn != null)
            {
                GameObject spawnInstance =
                    (GameObject)GameObject.Instantiate(spawn);
                spawnInstance.name = spawn.name;

                // Use the position of the game object we're attached to
                spawnInstance.transform.parent = gameObject.transform;
                spawnInstance.transform.localPosition = Vector3.zero;
                gameObject.transform.localScale = Vector3.one * 100;
            }
        }
        if (props.ContainsKey ("Platform")) {
            gameObject.GetComponent<Collider2D>().usedByEffector = true;
            gameObject.AddComponent<PlatformEffector2D>().surfaceArc = 170f;
        }
        if(props.ContainsKey("ColliderMaterial"))
        {
            foreach(Collider2D collider in gameObject.GetComponentsInChildren<Collider2D>())
            {
                string path = props["ColliderMaterial"];
                collider.sharedMaterial = (PhysicsMaterial2D)AssetDatabase.LoadAssetAtPath(path, typeof(PhysicsMaterial2D));
            }
        }
    }
Ejemplo n.º 3
0
  public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie) {
    
		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);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_1(tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode());

      return ret;
    }
  }
Ejemplo n.º 4
0
        public override bool TagApplies(UnityEngine.GameObject gameObject, AudioManager.ListenerInfo info)
        {
            SettingsManager.Options ModOptions = gameObject.GetComponent<SettingsManager>().ModOptions;
            int finalHappiness = (int)Singleton<DistrictManager>.instance.m_districts.m_buffer[0].m_finalHappiness;

            return (finalHappiness < ModOptions.MoodDependentMusic_MoodThreshold);
        }
Ejemplo n.º 5
0
		public override void Cast (UnityEngine.GameObject primaryTarget)
		{
			var wizz = primaryTarget.GetComponent<Wizard> ();
			if (wizz) {
				wizz.weapon.Enchant (this, Color.red, lifetime);
				UIStatusManager.Instance.AddBuff (DatabaseInstance.Icon, lifetime, "Deals fire damage on melee attacks");
			}
			Destroy (this.gameObject, lifetime);
		}
Ejemplo n.º 6
0
 public static void RemoveTopInfo(UnityEngine.GameObject obj)
 {
     UnityEngine.Component oldComp = obj.GetComponent<TopInfo>();
     if (oldComp != null)
     {
         Linker.LinkTo(obj, null);
         UnityEngine.GameObject.Destroy(oldComp);
     }
 }
    public void HandleCustomProperties(UnityEngine.GameObject gameObject,
        IDictionary<string, string> props)
    {
        if (props.ContainsKey("TargetDoor")) {
            gameObject.AddComponent<MurderMystery.DoorwayScript>();
            gameObject.GetComponent<MurderMystery.DoorwayScript>().targetDoor = props["TargetDoor"];
        }

        if (props.ContainsKey("Room")) {
            gameObject.AddComponent<MurderMystery.ContainerScript>();
            gameObject.GetComponent<MurderMystery.ContainerScript>().roomName = props["Room"];
            gameObject.tag = "Container";
            gameObject.layer = LayerMask.NameToLayer("Containers");
        }

        if (props.ContainsKey("Ceiling")) {
            gameObject.layer = LayerMask.NameToLayer("Ceilings");
            gameObject.tag = "Ceiling";
            Ceiling ceiling = gameObject.AddComponent<Ceiling>();
            ceiling.roomName = props["Ceiling"];
        }
    }
		private void SetAnimatorController(UnityEngine.UI.Image image, Transform speaker, ref Animator animator) {
			if (speaker == null || image == null) return;
			if (animator == null) animator = image.GetComponent<Animator>();
			if (animator == null) animator = image.gameObject.AddComponent<Animator>();
			if (!animatedPortraits.ContainsKey(speaker)) {
				var animatedPortrait = (speaker != null) ? speaker.GetComponentInChildren<AnimatedPortrait>() : null;
				animatedPortraits.Add(speaker, animatedPortrait);
			}
			if (animatedPortraits[speaker] != null) {
				var animatorController = animatedPortraits[speaker].animatorController;
				if (animator.runtimeAnimatorController != animatorController) {
					animator.runtimeAnimatorController = animatorController;
				}
			}

		}
Ejemplo n.º 9
0
  public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie) {
    
		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);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_1(tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode());

      return ret;
    }
  }
Ejemplo n.º 10
0
        // Applies damage to specified GameObject
        public override void ApplyDamageTo(UnityEngine.GameObject target)
        {
            // if the target object is equal to
            // the source object, return
            if (target == source)
                return;

            // Check the targets tag
            switch (target.tag)
            {
                // if it is the ship
                case "Ship":
                    // Get the ship and the shield components
                    var ship = target.GetComponent<Ship>();
                    var shield = ship.Shield;

                    // if the shield exists
                    // Set damage to the CurrentShields
                    if (shield != null && shield.CurrentShields >= 0)
                    {
                        Debug.Log("Hit Shield");
                        shield.CurrentShields -= damage;
                    }
                    // if the shield does not exist
                    // Set damage to the ship
                    else
                    {
                        Debug.Log("Hit Ship");
                        ship.CurrentHP -= damage;
                    }
                    break;

                // deafult case
                default:
                    break;
            }
            // Destroys object
            Destroy(gameObject);
        }
Ejemplo n.º 11
0
  public static AKRESULT GetPlayingIDsFromGameObject(UnityEngine.GameObject in_GameObjId, ref uint io_ruNumIDs, uint[] out_aPlayingIDs) {
    
		uint tempin_GameObjId;
		if ( in_GameObjId != null )
		{
			tempin_GameObjId = (uint)in_GameObjId.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_GameObjId.GetComponent<AkGameObject>() == null)
			{
				in_GameObjId.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_GameObjId, in_GameObjId.name);
			
				//Set the original position
				AkSoundEngine.SetObjectPosition(
		            in_GameObjId, 
		            in_GameObjId.transform.position.x, 
		            in_GameObjId.transform.position.y, 
		            in_GameObjId.transform.position.z, 
		            in_GameObjId.transform.forward.x,
		            in_GameObjId.transform.forward.y, 
		            in_GameObjId.transform.forward.z
		        	);
			}
		}
		else
		{
			tempin_GameObjId = unchecked((uint)-1);
		}
		
		
    {
      AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetPlayingIDsFromGameObject(tempin_GameObjId, ref io_ruNumIDs, out_aPlayingIDs);

      return ret;
    }
  }
Ejemplo n.º 12
0
  public static AKRESULT GetGameObjectAuxSendValues(UnityEngine.GameObject in_gameObjectID, AkAuxSendArray out_paAuxSendValues, ref uint io_ruNumSendValues) {
    
		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_GetGameObjectAuxSendValues(tempin_gameObjectID, out_paAuxSendValues.m_Buffer, ref io_ruNumSendValues);

      return ret;
    }
  }
Ejemplo n.º 13
0
  public static AKRESULT GetSwitch(string in_pstrSwitchGroupName, UnityEngine.GameObject in_GameObj, out uint out_rSwitchState) {
    
		uint tempin_GameObj;
		if ( in_GameObj != null )
		{
			tempin_GameObj = (uint)in_GameObj.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_GameObj.GetComponent<AkGameObject>() == null)
			{
				in_GameObj.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_GameObj, in_GameObj.name);
			
				//Set the original position
				AkSoundEngine.SetObjectPosition(
		            in_GameObj, 
		            in_GameObj.transform.position.x, 
		            in_GameObj.transform.position.y, 
		            in_GameObj.transform.position.z, 
		            in_GameObj.transform.forward.x,
		            in_GameObj.transform.forward.y, 
		            in_GameObj.transform.forward.z
		        	);
			}
		}
		else
		{
			tempin_GameObj = unchecked((uint)-1);
		}
		
		
    {
      AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetSwitch__SWIG_1(in_pstrSwitchGroupName, tempin_GameObj, out out_rSwitchState);

      return ret;
    }
  }
Ejemplo n.º 14
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>();

				// 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_ResetRTPCValue__SWIG_4(in_pszRtpcName, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve);

      return ret;
    }
  }
Ejemplo n.º 15
0
  public static AKRESULT SetMultiplePositions(UnityEngine.GameObject in_GameObjectID, AkPositionArray in_pPositions, ushort in_NumPositions, MultiPositionType in_eMultiPositionType) {
    
		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_SetMultiplePositions__SWIG_0(tempin_GameObjectID, in_pPositions.m_Buffer, in_NumPositions, (int)in_eMultiPositionType);

      return ret;
    }
  }
Ejemplo n.º 16
0
  public static AKRESULT SeekOnEvent(uint in_eventID, UnityEngine.GameObject in_gameObjectID, float in_fPercent) {
    
		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_SeekOnEvent__SWIG_7(in_eventID, tempin_gameObjectID, in_fPercent);

      return ret;
    }
  }
Ejemplo n.º 17
0
  public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags) {
    
		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);
		}
		
		
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_2(tempin_gameObjectID, in_uFlags);

      return ret;
    }
  }
Ejemplo n.º 18
0
  public static float GetMaxRadius(UnityEngine.GameObject in_GameObjId) {
    
		uint tempin_GameObjId;
		if ( in_GameObjId != null )
		{
			tempin_GameObjId = (uint)in_GameObjId.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_GameObjId.GetComponent<AkGameObject>() == null)
			{
				in_GameObjId.AddComponent<AkGameObject>();
			}
		}
		else
		{
			tempin_GameObjId = unchecked((uint)-1);
		}
		
		
    {
      float ret = AkSoundEnginePINVOKE.CSharp_GetMaxRadius(tempin_GameObjId);

      return ret;
    }
  }
Ejemplo n.º 19
0
  public static AKRESULT SetObjectPosition(UnityEngine.GameObject in_GameObjectID, float PosX, float PosY, float PosZ, float OrientationX, float OrientationY, float OrientationZ) {
    
		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_SetObjectPosition(tempin_GameObjectID, PosX, PosY, PosZ, OrientationX, OrientationY, OrientationZ);

      return ret;
    }
  }
Ejemplo n.º 20
0
  public static uint PostEvent(string in_pszEventName, UnityEngine.GameObject in_gameObjectID) {
    
		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);
		}
		
		
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_PostEvent__SWIG_11(in_pszEventName, tempin_gameObjectID);

      return ret;
    }
  }
Ejemplo n.º 21
0
  public static uint PostEvent(string in_pszEventName, UnityEngine.GameObject in_gameObjectID) {
    
		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);
		}
		
		
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_PostEvent__SWIG_11(in_pszEventName, tempin_gameObjectID);

      return ret;
    }
  }
Ejemplo n.º 22
0
  public static uint PostEvent(string in_pszEventName, UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, uint in_cExternals, AkExternalSourceInfo in_pExternalSources) {
    
		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);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_PostEvent__SWIG_7(in_pszEventName, tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode(), in_cExternals, AkExternalSourceInfo.getCPtr(in_pExternalSources));

      return ret;
    }
  }
Ejemplo n.º 23
0
  public static AKRESULT SetObjectPosition(UnityEngine.GameObject in_GameObjectID, float PosX, float PosY, float PosZ, float OrientationX, float OrientationY, float OrientationZ) {
    
		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_SetObjectPosition(tempin_GameObjectID, PosX, PosY, PosZ, OrientationX, OrientationY, OrientationZ);

      return ret;
    }
  }
Ejemplo n.º 24
0
  public static AKRESULT GetPlayingIDsFromGameObject(UnityEngine.GameObject in_GameObjId, ref uint io_ruNumIDs, uint[] out_aPlayingIDs) {
    
		uint tempin_GameObjId;
		if ( in_GameObjId != null )
		{
			tempin_GameObjId = (uint)in_GameObjId.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_GameObjId.GetComponent<AkGameObject>() == null)
			{
				in_GameObjId.AddComponent<AkGameObject>();
			}
		}
		else
		{
			tempin_GameObjId = unchecked((uint)-1);
		}
		
		
    {
      AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetPlayingIDsFromGameObject(tempin_GameObjId, ref io_ruNumIDs, out_aPlayingIDs);

      return ret;
    }
  }
Ejemplo n.º 25
0
  public static AKRESULT SeekOnEvent(string in_pszEventName, UnityEngine.GameObject in_gameObjectID, int in_iPosition, bool in_bSeekToNearestMarker) {
    
		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_SeekOnEvent__SWIG_2(in_pszEventName, tempin_gameObjectID, in_iPosition, in_bSeekToNearestMarker);

      return ret;
    }
  }
Ejemplo n.º 26
0
  public static AKRESULT GetObjectObstructionAndOcclusion(UnityEngine.GameObject in_ObjectID, uint in_uListener, out float out_rfObstructionLevel, out float out_rfOcclusionLevel) {
    
		uint tempin_ObjectID;
		if ( in_ObjectID != null )
		{
			tempin_ObjectID = (uint)in_ObjectID.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_ObjectID.GetComponent<AkGameObject>() == null)
			{
				in_ObjectID.AddComponent<AkGameObject>();
			}
		}
		else
		{
			tempin_ObjectID = unchecked((uint)-1);
		}
		
		
    {
      AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetObjectObstructionAndOcclusion(tempin_ObjectID, in_uListener, out out_rfObstructionLevel, out out_rfOcclusionLevel);

      return ret;
    }
  }
Ejemplo n.º 27
0
  public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration) {
    
		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_2(in_eventID, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration);

      return ret;
    }
  }
Ejemplo n.º 28
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>();
			}
		}
		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;
    }
  }
Ejemplo n.º 29
0
        public override bool TagApplies(UnityEngine.GameObject gameObject, AudioManager.ListenerInfo info)
        {
            SettingsManager.Options ModOptions = gameObject.GetComponent<SettingsManager>().ModOptions;

            return (GetListenerHeight(info) > ModOptions.HeightDependentMusic_HeightThreshold);
        }
Ejemplo n.º 30
0
  public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID) {
    
		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_8(in_pszEventName, (int)in_ActionType, tempin_gameObjectID);

      return ret;
    }
  }