Drop.CreateShopItem C# (CSharp) Method

CreateShopItem() public static method

public static CreateShopItem ( Transform tf, bool parent = false ) : GameObject
tf Transform
parent bool
return GameObject
	public static GameObject CreateShopItem(Transform tf, bool parent = false){
		switch((int)(Random.value * 3)){
			// POTION
			case 0:
				GameObject p = CreatePotion(tf, parent);
				p.transform.localEulerAngles = new Vector3(270,180,0);
				p.GetComponent<Rigidbody>().isKinematic = true;
				return p;
			break;

			// TOME
			case 1:
				GameObject t = CreateTome(tf, parent);
				t.transform.localEulerAngles = new Vector3(0,0,180);
				return t;
			break;

			// SCROLL
			case 2:
				GameObject s = CreateScroll(tf, parent);
				s.transform.localEulerAngles = new Vector3(90,90,0);
				return s;
			break;
		}

		return null;
	}
}