private void WaveResetEnemyResetupFunction(string prefabId, int num, int i, bool isRecover = false) { CharacterParams @object = base.battleStateData.preloadEnemiesParams.GetObject(prefabId, num.ToString()); @object.gameObject.SetActive(true); @object.Initialize(base.hierarchyData.cameraObject.camera3D); @object.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null); @object.transform.position = base.battleStateData.enemiesSpawnPoint[i].position; @object.transform.rotation = base.battleStateData.enemiesSpawnPoint[i].rotation; base.battleStateData.enemies[i].CharacterParams = @object; if (!isRecover) { base.battleStateData.enemies[i].InitializeAp(); } ThreeDHoldPressButton threeDHoldPressButton = @object.gameObject.GetComponent <ThreeDHoldPressButton>(); if (threeDHoldPressButton == null) { threeDHoldPressButton = @object.gameObject.AddComponent <ThreeDHoldPressButton>(); threeDHoldPressButton.camera3D = base.hierarchyData.cameraObject.camera3D; } else { threeDHoldPressButton.onHoldWaitPress.Clear(); threeDHoldPressButton.onDisengagePress.Clear(); } threeDHoldPressButton.waitPressCall = 0.2f; BattleInputUtility.AddEvent(threeDHoldPressButton.onHoldWaitPress, new Action <int>(base.stateManager.input.OnShowEnemyDescription3D), i); BattleInputUtility.AddEvent(threeDHoldPressButton.onDisengagePress, new Action(base.stateManager.input.OnHideEnemyDescriotion3D)); @object.gameObject.SetActive(false); }
private void SetupMenu() { (this.ui.battleAlwaysUi as MultiBattleAlways).SetupMenuButton(base.stateManager.multiBasicFunction.IsOwner); BattleInputUtility.AddEvent(this.ui.menuButton.onClick, new Action(this.inputMulti.OnMultiShowMenu)); this.ui.menuDialog.AddRetireButtonEvent(new Action(base.input.OnClickMenuRetireButton)); this.ui.menuDialog.AddCloseButtonEvent(new Action(base.input.OnClickMenuCloseButton)); }
private void SetupMonster() { for (int i = 0; i < this.ui.skillSelectUi.monsterButton.Length; i++) { BattleInputUtility.AddEvent(this.ui.skillSelectUi.monsterButton[i].playerMonsterDescriptionSwitch.onDisengagePress, new Action <int>(this.inputMulti.OnClickMultiMonsterButton), i); BattleInputUtility.AddEvent(this.ui.skillSelectUi.monsterButton[i].playerMonsterDescriptionSwitch.onHoldWaitPress, new Action <int>(base.input.OnPressMonsterButton), i); BattleInputUtility.AddEvent(this.ui.skillSelectUi.monsterButton[i].playerMonsterDescriptionSwitch.onDisengagePress, new Action(base.input.OffPressMonsterButton)); } }
public void AddEvent(Action specificTradecallback, Action revivalCallBack, Action retireCallback, bool isOwner = true) { BattleInputUtility.AddEvent(this.specificTradeButton.onClick, specificTradecallback); if (isOwner) { BattleInputUtility.AddEvent(this.retireButton.onClick, retireCallback); BattleInputUtility.AddEvent(this.revivalButton.onClick, revivalCallBack); } }
public void SetRotationEffectCallback(Action <int> callback, int value) { UITweenEventSystem component = this.rotationEffect1.gameObject.GetComponent <UITweenEventSystem>(); BattleInputUtility.AddEvent(component.onFinished, callback, value); UITweenEventSystem component2 = this.rotationEffect2.gameObject.GetComponent <UITweenEventSystem>(); BattleInputUtility.AddEvent(component2.onFinished, callback, value); }
public void AddEvent(Action skipWinnerAction) { BattleInputUtility.AddEvent(this.nextButton.onClick, skipWinnerAction); }
public override IEnumerator AfterInitializeUI() { this.CreateBattleRoundEnd(); NGUITools.SetActiveSelf(this.battleDialog.gameObject, true); base.AfterInitializeUIBefore(); this.HideAlertDialog(); for (int i = 0; i < this.ui.skillSelectUi.monsterButton.Length; i++) { BattleInputUtility.AddEvent(this.ui.skillSelectUi.monsterButton[i].playerMonsterDescriptionSwitch.onHoldWaitPress, new Action <int>(base.input.OnPressMonsterButton), i); BattleInputUtility.AddEvent(this.ui.skillSelectUi.monsterButton[i].playerMonsterDescriptionSwitch.onDisengagePress, new Action(base.input.OffPressMonsterButton)); } for (int j = 0; j < this.ui.skillSelectUi.skillButton.Length; j++) { if (j > 0) { this.ui.skillSelectUi.skillButton[j].SetClickCallback(new Action <int>(base.input.OnClickSkillButton), j); this.ui.skillSelectUi.skillButton[j].SetHoldWaitPressCallback(new Action <int>(base.input.OnPressSkillButton), j); this.ui.skillSelectUi.skillButton[j].SetDisengagePressCallback(new Action <int>(base.input.OffPressSkillButton), j); } else { this.ui.skillSelectUi.skillButton[j].SetButtonCallback(new Action <int>(base.input.OnClickSkillButton), j); } this.ui.skillSelectUi.skillButton[j].SetRotationEffectCallback(new Action <int>(base.input.OnSkillButtonRotateAfter), j); } BattleInputUtility.AddEvent(this.ui.menuButton.onClick, new Action(this.inputPvP.OnPvPShowMenu)); this.ui.dialogRetire.AddEvent(new Action(this.inputPvP.OnClickPvPRetireDialogOkButton), new Action(base.input.OnClickRetireDialogCancelButton)); this.ui.initialInduction.AddEvent(new Action(base.input.OnClickCloseInitialInductionButton)); BattleInputUtility.AddEvent(this.ui.winNextButton.onClick, new Action(base.input.OnClickSkipWinnerAction)); IEnumerator hitIconInitialize = base.stateManager.uiControl.HitIconInitialize(); while (hitIconInitialize.MoveNext()) { yield return(null); } IEnumerator hudInitialize = base.stateManager.uiControl.HUDInitialize(); while (hudInitialize.MoveNext()) { yield return(null); } IEnumerator manualSelectTargetInitialize = base.stateManager.uiControl.ManualSelectTargetInitialize(); while (manualSelectTargetInitialize.MoveNext()) { yield return(null); } this.ui.rootPanel.RebuildAllDrawCalls(); base.InstantiateGimmickStatusEffect(); base.stateManager.uiControl.ApplyHideHitIcon(); base.stateManager.uiControl.ApplyDroppedItemHide(); base.stateManager.uiControlPvP.ApplySetAlwaysUIObject(false); this.ui.itemInfoField.ApplyDroppedItemIconHide(); this.SetupEmotion(); this.SetupTimer(); string playerName = base.stateManager.pvpFunction.GetPlayerName(); string enemyName = base.stateManager.pvpFunction.GetEnemyName(); this.ui.playerNameLabel.text = playerName; this.ui.enemyNameLabel.text = enemyName; string playerTitleId = base.stateManager.pvpFunction.GetPlayerTitleId(); string enemyTitleId = base.stateManager.pvpFunction.GetEnemyTitleId(); TitleDataMng.SetTitleIcon(playerTitleId, this.ui.playerTitleIcon); TitleDataMng.SetTitleIcon(enemyTitleId, this.ui.enemyTitleIcon); yield break; }
public void AddEvent(Action <int> onPressHud, Action offPressHud, int onHoldWaitPressValue) { BattleInputUtility.AddEvent(this.holdPressButton.onHoldWaitPress, onPressHud, onHoldWaitPressValue); BattleInputUtility.AddEvent(this.holdPressButton.onDisengagePress, offPressHud); }
public void AddEvent(Action callback) { BattleInputUtility.AddEvent(this.autoButton.onClick, callback); }
public void AddRevivalButtonEvent(Action callback) { BattleInputUtility.AddEvent(this.revivalButton.onClick, callback); }
public void AddSpecificTradeButtonEvent(Action callback) { BattleInputUtility.AddEvent(this.specificTradeButton.onClick, callback); }
public void AddEvent(Action retireOkAction, Action retireCancelAction) { BattleInputUtility.AddEvent(this.yesButton.onClick, retireOkAction); BattleInputUtility.AddEvent(this.noButton.onClick, retireCancelAction); }
public void AddEvent(Action OnClickCloseInitialInductionButton) { BattleInputUtility.AddEvent(this.button.onClick, OnClickCloseInitialInductionButton); }
public void SetDisengagePressCallback(Action <int> callback, int value) { BattleInputUtility.AddEvent(this.skillDescriptionSwitch.onDisengagePress, callback, value); }
public void SetClickCallback(Action <int> callback, int value) { BattleInputUtility.AddEvent(this.skillDescriptionSwitch.onClick, callback, value); }
public void SetButtonCallback(Action <int> callback, int value) { BattleInputUtility.AddEvent(this.button.onClick, callback, value); }