public void PlayBalloon(MapEventItemModel model, Action onFinished) { ProdBalloon balloon = ProdBalloon.Instantiate(((Component)_prefabProdBalloon).GetComponent <ProdBalloon>(), base.transform, _iDirection, model); balloon.depth = _uiShipSprite.depth + 1; balloon.ShowHide().setOnComplete((Action) delegate { Dlg.Call(ref onFinished); UnityEngine.Object.Destroy(balloon.gameObject); Mem.Del(ref balloon); }); }
public void PlayBalloon(MapEventAirReconnaissanceModel eventAirRecModel, MapEventItemModel eventItemModel, Action onFinished) { if (eventAirRecModel.AircraftType == MapAirReconnaissanceKind.Impossible) { Dlg.Call(ref onFinished); return; } ProdBalloon balloon = ProdBalloon.Instantiate(((Component)_prefabProdBalloon).GetComponent <ProdBalloon>(), base.transform, _iDirection, eventAirRecModel, eventItemModel); balloon.depth = _uiShipSprite.depth + 1; balloon.ShowHide().setOnComplete((Action) delegate { Dlg.Call(ref onFinished); UnityEngine.Object.Destroy(balloon.gameObject); Mem.Del(ref balloon); }); }