public static ProdItem Instantiate(ProdItem prefab, Transform parent, MapEventItemModel model) { ProdItem prodItem = Object.Instantiate <ProdItem>(prefab); prodItem.get_transform().set_parent(parent); prodItem.get_transform().set_localScale(Vector3.get_one() * 1.3f); prodItem.get_transform().localPositionZero(); prodItem.Init(model); return(prodItem); }
public void PlayLostMaterial(MapEventHappeningModel mapEventHappeningModel, Action onFinished) { ProdItem prodItem = ProdItem.Instantiate(((Component)_prefabEventItem).GetComponent <ProdItem>(), base.transform, mapEventHappeningModel); prodItem.PlayLostAnim(onFinished); }
public void PlayGetMaterialOrItem(MapEventItemModel mapEventItemModel, Action onFinished) { ProdItem prodItem = ProdItem.Instantiate(this._prefabEventItem.GetComponent <ProdItem>(), base.get_transform(), mapEventItemModel); prodItem.PlayGetAnim(onFinished); }