Merge pull request 'feature/combo-skill-short-cut' (#366) from feature/combo-skill-short-cut into develop
Reviewed-on: https://git.pthub.vn/Unity/perfect-world-unity/pulls/366
This commit is contained in:
@@ -16,6 +16,7 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
public class AUIImagePicture : AUIImagePictureBase
|
||||
{
|
||||
public const string DefaultComboIcon = "爱你";
|
||||
[SerializeField] Button skillbutton;
|
||||
[SerializeField] GameObject borderImage;
|
||||
[SerializeField] int cooldownTime;
|
||||
[SerializeField] AUIClockIcon m_ClockCounter;
|
||||
@@ -36,6 +37,12 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
if (skillbutton == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
skillbutton.onClick.RemoveAllListeners();
|
||||
skillbutton.onClick.AddListener(Execute);
|
||||
m_pParent = GetComponentInParent<AUIDialog>();
|
||||
// _skillID = int.Parse(this.name.Split('_')[1]);
|
||||
}
|
||||
@@ -44,11 +51,14 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
{
|
||||
if (isInteract)
|
||||
{
|
||||
skillbutton.interactable = true;
|
||||
disPlayImage.color = Color.white;
|
||||
}
|
||||
else
|
||||
{
|
||||
disPlayImage.color = Color.gray;
|
||||
|
||||
skillbutton.interactable = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +97,12 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
Debug.LogError("Skill Image is not assigned in AUIImagePicture");
|
||||
return;
|
||||
}
|
||||
|
||||
if (skillbutton != null)
|
||||
{
|
||||
skillbutton.interactable = true;
|
||||
}
|
||||
|
||||
disPlayImage.color = Color.white;
|
||||
disPlayImage.sprite = sprite;
|
||||
disPlayImage.gameObject.SetActive(true);
|
||||
@@ -95,9 +111,11 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
}
|
||||
private IEnumerator CooldownRoutine()
|
||||
{
|
||||
skillbutton.interactable = false;
|
||||
disPlayImage.color = Color.gray;
|
||||
yield return new WaitForSeconds(cooldownTime);
|
||||
disPlayImage.color = Color.white;
|
||||
skillbutton.interactable = true;
|
||||
}
|
||||
public AUIClockIcon GetClockIcon() => m_ClockCounter;
|
||||
|
||||
@@ -116,6 +134,7 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
{
|
||||
// BMLogger.Log("Clear AUIImagePicture with name: " + name) ;
|
||||
base.Clear();
|
||||
skillbutton.interactable = true;
|
||||
if (disPlayImage != null)
|
||||
{
|
||||
disPlayImage.color = Color.white;
|
||||
@@ -214,7 +233,6 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
}
|
||||
|
||||
_skillGroupIndex = resolvedGroup;
|
||||
|
||||
Clear();
|
||||
return false;
|
||||
}
|
||||
@@ -227,6 +245,7 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
return false;
|
||||
}
|
||||
|
||||
skillbutton.interactable = true;
|
||||
var uiMan = EC_Game.GetGameRun()?.GetUIManager()?.GetInGameUIMan();
|
||||
if (uiMan == null)
|
||||
{
|
||||
|
||||
@@ -144,6 +144,7 @@ namespace BrewMonster
|
||||
|
||||
private void OnClickedConfirmCombo()
|
||||
{
|
||||
_skillSetUpComboWidget.ShowCurrentCombos();
|
||||
if (_currentSelectComboSlot != null &&
|
||||
_skillSetUpComboWidget.CurrentComboSetting.comboSkill[_currentSelectComboSlot.GetSlotIndex].idSkill == null)
|
||||
{
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace BrewMonster
|
||||
_btnLoopAttack.OnClickedSkillSlot -= OnSelectedSkillToAsign;
|
||||
}
|
||||
|
||||
private void ShowCurrentCombos()
|
||||
public void ShowCurrentCombos()
|
||||
{
|
||||
// setting.comboSkill[GetData() - 1].nIcon = (byte)m_nIcon;
|
||||
if (Setting.comboSkill == null || _combosList.Count != Setting.comboSkill.Length)
|
||||
|
||||
Reference in New Issue
Block a user