public static ShowPreviewTowerEventArgs Create(TowerData towerData, object userData = null) { ShowPreviewTowerEventArgs showPreviewTowerEventArgs = ReferencePool.Acquire <ShowPreviewTowerEventArgs>(); showPreviewTowerEventArgs.TowerData = towerData; return(showPreviewTowerEventArgs); }
private void OnShowPreviewTower(object sender, GameEventArgs e) { ShowPreviewTowerEventArgs ne = (ShowPreviewTowerEventArgs)e; if (ne == null) { return; } if (levelControl == null) { return; } levelControl.ShowPreviewTower(ne.TowerData); }
public void ShowBuildInfo(TowerData towerData) { if (towerData == null) { return; } TowerLevelData towerLevelData = towerData.GetTowerLevelData(0); if (towerLevelData == null) { return; } buildInfoName.text = towerData.Name; buildInfoDps.text = towerLevelData.DPS.ToString(); BuildInfoDes.text = towerLevelData.Des; GameEntry.Event.Fire(this, ShowPreviewTowerEventArgs.Create(towerData)); showBuildInfo = true; }