Example #1
0
    public void PlaySubFx(SubFxDirection dir, SubFxQuality quality)
    {
        GameObject dirObject = directionObjs [(int)dir];

        dirObject.SetActive(true);


        Transform missile = dirObject.transform.Find(missleObjectName[(int)quality]);

        if (missile != null)
        {
            missile.gameObject.SetActive(true);
        }
        else
        {
            Debug.LogWarning("can't find missle " + dir + "   " + quality);
        }

        Transform fxObj = dirObject.transform.Find(fxObjectName[(int)quality]);

        if (fxObj != null)
        {
            fxObj.gameObject.SetActive(true);
        }
        else
        {
            Debug.LogWarning("can't find " + dir + "   " + quality);
        }
    }
Example #2
0
	public void PlaySubFx(SubFxDirection dir ,SubFxQuality quality){

		GameObject dirObject = directionObjs [(int)dir];
		dirObject.SetActive (true);


		Transform missile = dirObject.transform.Find( missleObjectName[(int) quality] );
		if (missile != null) {
				missile.gameObject.SetActive (true);
			} else {
			Debug.LogWarning("can't find missle "+ dir + "   " + quality);
		}

		Transform fxObj = dirObject.transform.Find( fxObjectName[(int) quality]);
		if (fxObj != null) {
			fxObj.gameObject.SetActive (true);


			} else {
			Debug.LogWarning ("can't find " + dir + "   " + quality);
		}
	}