Exemplo n.º 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;
    }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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);
			}
		}
Exemplo n.º 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;
			}
		}