public void Spawn(TYPE_ITEM type) { vecTemp.x = Random.Range(fLeftLimit, fRightLimit); vecTemp.y = Random.Range(fTopLimit, fBottomLimit); switch (type) { //case TYPE_ITEM.Gem: //break; case TYPE_ITEM.Boom: case TYPE_ITEM.Pepsi: Instantiate(prefabs[(int)type], vecTemp, Quaternion.identity, null); break; default: Debug.Log("Spawn Item: nothing!"); break; } }
// Spawn ra tại location đó public void Spawn(TYPE_ITEM type, Vector3 location) { temp = Instantiate(prefabs[(int)type]) as GameObject; temp.transform.position = location; }
public TYPE_ITEM mTypeItem; //アイテム種別 /// <summary> /// コンストラクタ /// </summary> public ClsDatItem() { this.mLineNo = -1; this.mTab = 0; this.mTypeItem = TYPE_ITEM.NONE; }
public void changeState(TYPE_ITEM newState) { nextState = newState; }