예제 #1
0
	public GameObject InstantialeEffect(Effect_ID ID,Vector3 pos)
	{
		GameObject effect;
		effect = (GameObject)Instantiate(effectList[(int)ID],pos,transform.rotation);
		effect.SetActive(true);
		Destroy(effect,1f);
		return effect;
	}
예제 #2
0
	public GameObject GetFreeObject(Effect_ID ID, Vector3 pos){
		for (int j = 0; j < PoolUnit; j++) {
			if (effectPool [(int)ID, j].activeInHierarchy == false) {
				effectPool [(int)ID, j].transform.position = pos;
				effectPool [(int)ID, j].SetActive (true);
				return effectPool [(int)ID, j];
			}
		}
		return null;
	}