Пример #1
0
    private void Awake()
    {
        // On evite de creer plusieur instance d'Inventory
        if (instance != null)
        {
            Debug.LogWarning("Il y a plus d'une instance de AudioManager dans la scene");
            return;
        }

        instance = this;
    }
Пример #2
0
 void ResetRotation()
 {
     foreach (Object temp in particlesList)
     {
         GameObject tempGO = temp as GameObject;
         if (tempGO.GetComponent <KunaiRotation>() != null)
         {
             kunaiRotation = tempGO.GetComponent <KunaiRotation>();
         }
         DestroyImmediate(kunaiRotation, true);
     }
 }
Пример #3
0
 void SetRotation()
 {
     foreach (Object temp in particlesList)
     {
         GameObject tempGO = temp as GameObject;
         if (tempGO.GetComponent <KunaiRotation>() == null)
         {
             kunaiRotation = tempGO.AddComponent <KunaiRotation>() as KunaiRotation;
         }
         else
         {
             kunaiRotation = tempGO.GetComponent <KunaiRotation>();
         }
         kunaiRotation.xSpeed = xSpeed;
         kunaiRotation.ySpeed = ySpeed;
         kunaiRotation.zSpeed = zSpeed;
     }
 }
Пример #4
0
		void ResetRotation ()
		{
			foreach(Object temp in particlesList)
			{
				GameObject tempGO = temp as GameObject;
				if(tempGO.GetComponent<KunaiRotation>() != null)
				{
					kunaiRotation = tempGO.GetComponent<KunaiRotation>();
				}
				DestroyImmediate(kunaiRotation, true);
			}
		}
Пример #5
0
		void SetRotation ()
		{
			foreach(Object temp in particlesList)
			{
				GameObject tempGO = temp as GameObject;
				if(tempGO.GetComponent<KunaiRotation>() == null)
				{
					kunaiRotation = tempGO.AddComponent<KunaiRotation>() as KunaiRotation;
				}
				else{kunaiRotation = tempGO.GetComponent<KunaiRotation>();}
				kunaiRotation.xSpeed = xSpeed;
				kunaiRotation.ySpeed = ySpeed;
				kunaiRotation.zSpeed = zSpeed;
			}
		}