private void ShowRegenerate(HitIcon.Data data, int value) { if (value > 0) { BattleStateUIProperty uiProperty = BattleStateManager.current.uiProperty; base.transform.localScale = uiProperty.hitIconLocalScale * uiProperty.onPoisonScalingSizeHitIcon; data.bottomMesh.text = this.GetString("HitIconRegenerate"); data.numMesh.text = value.ToString(); this.ChangeFontTexture(this.standardEffectFontTexture.pink, new TextMeshPro[] { data.numMesh, data.bottomMesh }); } else { data.middleMesh.text = this.GetString("HitIconRegenerate"); this.ChangeFontTexture(this.standardEffectFontTexture.pink, new TextMeshPro[] { data.middleMesh }); } }
private void Awake() { if (this.onCalledAwake) { return; } this.onCalledAwake = true; this.battleStateData.isEnableBackKeySystem = false; this._battleScreen = BattleScreen.Static; BattleStateManager.current = this; if (SoundMng.Instance() == null) { SoundMng soundMng = base.gameObject.AddComponent <SoundMng>(); soundMng.Initialize(); } this.soundManager = SoundMng.Instance(); this.hierarchyData.Initialize(); Input.multiTouchEnabled = false; this.battleUiComponents = base.GetComponent <BattleUIComponents>(); this.input = base.GetComponent <BattleInputBasic>(); if (this.battleUiComponents == null && this.input == null) { BattleMode battleMode = this.battleMode; if (battleMode != BattleMode.Single) { if (battleMode != BattleMode.Multi) { if (battleMode == BattleMode.PvP) { this.battleUiComponents = this.battleUIComponentsPvP; this.input = this.battleUiComponents.gameObject.AddComponent <BattleInputPvP>(); } } else { this.battleUiComponents = this.battleUIComponentsMulti; this.input = this.battleUiComponents.gameObject.AddComponent <BattleInputMulti>(); } } else { this.battleUiComponents = this.battleUIComponentsSingle; this.input = this.battleUiComponents.gameObject.AddComponent <BattleInputSingle>(); } this.battleUIComponentsSingle.enabled = (this.battleMode == BattleMode.Single); this.battleUIComponentsMulti.enabled = (this.battleMode == BattleMode.Multi); this.battleUIComponentsPvP.enabled = (this.battleMode == BattleMode.PvP); } if (this.battleUiComponents != null) { this.battleUiComponents.Init(); } this._stateProperty = BattleActionProperties.GetProperties(this.battleMode); this._uiProperty = BattleActionProperties.GetUIProperties(this.battleMode); if (BattleStateManager.onAutoServerConnect) { this._onServerConnect = true; } if (BattleStateManager.onAutoChangeTutorialMode) { BattleStateManager._battleMode = BattleMode.Tutorial; } this.initialize = new BattleInitialize(); this.events = new BattleEvent(); this.values = new BattleValues(); this.waveControl = new BattleWaveControl(); this.fraudCheck = new BattleFraudCheck(); this.soundPlayer = new BattleSoundPlayer(); this.help = new BattleHelp(); this.time = new BattleTime(); this.sleep = new BattleSleep(); this.system = new BattleSystem(); this.threeDAction = new Battle3DAction(); this.cameraControl = new BattleCameraControl(this); this.targetSelect = new BattleTargetSelect(); this.deadOrAlive = new BattleDeadOrAlive(); this.callAction = new BattleCallAction(); this.serverControl = new BattleServerControl(); this.recover = new BattleRecover(); this.log = new BattleLog(); this.roundFunction = new BattleRoundFunction(); this.skillDetails = new BattleSkillDetails(); switch (this.battleMode) { case BattleMode.Multi: this.uiControl = new BattleUIControlMulti(); this.multiBasicFunction = new BattleMultiFunction(); this._rootState = new MultiBattleState(); if (!Singleton <TCPMessageSender> .IsInstance()) { base.gameObject.AddComponent <TCPMessageSender>(); } break; case BattleMode.PvP: this.uiControl = new BattleUIControlPvP(); this.multiBasicFunction = new BattlePvPFunction(); this._rootState = new PvPBattleState(); if (!Singleton <TCPMessageSender> .IsInstance()) { base.gameObject.AddComponent <TCPMessageSender>(); } break; case BattleMode.Tutorial: this.tutorial = new BattleTutorial(); this.uiControl = new BattleUIControlSingle(); this._rootState = new SingleBattleState(); break; default: this.uiControl = new BattleUIControlSingle(); this._rootState = new SingleBattleState(); break; } this.uiControl.ApplySetBattleStateRegistration(); foreach (IBattleFunctionInput battleFunctionInput in this.GetAllBattleFunctions()) { if (battleFunctionInput != null) { battleFunctionInput.BattleAwakeInitialize(); } } if (this.input) { this.input.BattleAwakeInitialize(); } if (this.onServerConnect) { this.BattleTrigger(); } }