예제 #1
0
 public override void OnDestroyElement()
 {
     if (this.projector != null)
     {
         this.projector.Destroy();
         this.projector = null;
     }
     if (this.observingClockViewTime)
     {
         this.observingClockViewTime = false;
         Service.ViewTimeEngine.UnregisterClockTimeObserver(this);
     }
     if (this.sliders != null)
     {
         for (int i = 0; i < 6; i++)
         {
             this.sliders[i] = null;
         }
     }
     if (this.storageItemGrid != null)
     {
         this.storageItemGrid.Clear();
         this.storageItemGrid = null;
     }
     this.troopTooltipHelper.Destroy();
     this.troopTooltipHelper = null;
     this.troopList          = null;
     base.OnDestroyElement();
 }
예제 #2
0
 public AbstractBattleEndScreen(string assetName, bool isReplay) : base(assetName)
 {
     this.isReplay = isReplay;
     this.isNonAttackerReplayView = (isReplay && Service.Get <CurrentPlayer>().PlayerId != Service.Get <BattleController>().GetCurrentBattle().Attacker.PlayerId);
     this.setup              = false;
     this.destroyed          = false;
     this.viewTimers         = new List <uint>();
     this.viewAnimators      = new List <Animator>();
     this.faction            = Service.Get <CurrentPlayer>().Faction;
     this.cameraShake        = new CameraShake(null);
     this.troopTooltipHelper = new TroopTooltipHelper();
     this.numAssetsPendingLoad++;
     this.starsHandle = AssetHandle.Invalid;
     Service.Get <AssetManager>().Load(ref this.starsHandle, "gui_battle_stars", new AssetSuccessDelegate(this.OnStarsLoadSuccess), new AssetFailureDelegate(this.OnAssetLoadFail), null);
 }
예제 #3
0
 public override void OnDestroyElement()
 {
     if (this.itemGrid != null)
     {
         this.itemGrid.Clear();
         this.itemGrid = null;
     }
     this.troopTooltipHelper.Destroy();
     this.troopTooltipHelper = null;
     if (this.revengeButtons != null)
     {
         this.revengeButtons.Clear();
         this.revengeButtons = null;
     }
     base.OnDestroyElement();
 }
예제 #4
0
        public override void OnDestroyElement()
        {
            int i     = 0;
            int count = this.viewAnimators.Count;

            while (i < count)
            {
                Animator animator = this.viewAnimators[i];
                animator.enabled = false;
                i++;
            }
            this.viewAnimators.Clear();
            int j      = 0;
            int count2 = this.viewTimers.Count;

            while (j < count2)
            {
                Service.Get <ViewTimerManager>().KillViewTimer(this.viewTimers[j]);
                j++;
            }
            this.viewTimers.Clear();
            this.troopTooltipHelper.Destroy();
            this.troopTooltipHelper = null;
            if (this.starsHandle != AssetHandle.Invalid)
            {
                Service.Get <AssetManager>().Unload(this.starsHandle);
                this.starsHandle = AssetHandle.Invalid;
            }
            if (this.starsObject != null)
            {
                UnityEngine.Object.Destroy(this.starsObject);
                this.starsObject = null;
            }
            if (this.troopGrid != null)
            {
                this.troopGrid.Clear();
                this.troopGrid = null;
            }
            this.numAssetsPendingLoad        = 0;
            this.primaryActionButton.Enabled = true;
            this.setup       = false;
            this.destroyed   = true;
            this.cameraShake = null;
            base.OnDestroyElement();
        }
예제 #5
0
 public BuildingInfoScreen(SmartEntity selectedBuilding, bool useUpgradeGroup) : base("gui_building", selectedBuilding)
 {
     this.useUpgradeGroup    = useUpgradeGroup;
     this.projector          = null;
     this.troopTooltipHelper = new TroopTooltipHelper();
 }
예제 #6
0
 public BattleLogScreen() : base("gui_battle_log")
 {
     this.troopTooltipHelper = new TroopTooltipHelper();
     this.sdc = Service.StaticDataController;
     this.SetTab(BattleLogTab.Defense);
 }