Exemplo n.º 1
0
        public static HidePreviewTowerEventArgs Create(TowerData towerData, object userData = null)
        {
            HidePreviewTowerEventArgs hidePreviewTowerEventArgs = ReferencePool.Acquire <HidePreviewTowerEventArgs>();

            hidePreviewTowerEventArgs.TowerData = towerData;
            return(hidePreviewTowerEventArgs);
        }
Exemplo n.º 2
0
        private void OnHidePreviewTower(object sender, GameEventArgs e)
        {
            HidePreviewTowerEventArgs ne = (HidePreviewTowerEventArgs)e;

            if (ne == null)
            {
                return;
            }

            HideBuildInfo();
        }
        public void HidePreviewTower()
        {
            if (uiMaskFormSerialId != null)
            {
                GameEntry.UI.CloseUIForm((int)uiMaskFormSerialId);
            }

            GameEntry.Event.Fire(this, HidePreviewTowerEventArgs.Create(previewTowerData));

            if (previewTowerEntity != null)
            {
                entityLoader.HideEntity(previewTowerEntity);
            }

            uiMaskFormSerialId = null;

            previewTowerEntity = null;
            previewTowerData   = null;

            isBuilding = false;
        }