Commit e1439d39 authored by Hà Trung (NEGAXY)'s avatar Hà Trung (NEGAXY)

no message

parent cea7a460
......@@ -242,7 +242,7 @@ public class Controller : MonoBehaviour
if (attacking && !default_attacking)
{
// default skill
if (Class_Interface.defaultEnabled == true) StartCoroutine(Default_Weapon());
if (Interface.instance.skillSelectionManager.SelectedID == 0) StartCoroutine(Default_Weapon());
}
break;
case TouchPhase.Ended:
......
......@@ -236,7 +236,7 @@ public class Interface : MonoBehaviour
UnityEngine.SceneManagement.SceneManager.LoadScene("home");
}
private void Update()
private void FixedUpdate()
{
timeTouch = Mathf.Max(timeTouch - Time.deltaTime, 0f);
}
......
......@@ -391,13 +391,13 @@ PrefabInstance:
type: 3}
propertyPath: skillIcons.Array.data[10]
value:
objectReference: {fileID: 21300000, guid: 385164a187be35e42b1f850339c776f0,
objectReference: {fileID: 21300000, guid: 4c68ede49dd5cb74bb3693c7892dea78,
type: 3}
- target: {fileID: 3085710841308703070, guid: 46055a37191d9ea4597d0bea4020c0af,
type: 3}
propertyPath: skillIcons.Array.data[11]
value:
objectReference: {fileID: 21300000, guid: 4c68ede49dd5cb74bb3693c7892dea78,
objectReference: {fileID: 21300000, guid: 385164a187be35e42b1f850339c776f0,
type: 3}
- target: {fileID: 3085710841308703070, guid: 46055a37191d9ea4597d0bea4020c0af,
type: 3}
......
......@@ -8,30 +8,32 @@ public class SkillSelectionManager : MonoBehaviour
public int SelectedID = 0;
public List<SkillSelectionGUI> skills = new List<SkillSelectionGUI>();
public Transform specialTab;
public GameObject selectionTab;
public Sprite noneIcon;
//public GameObject selectionTab;
public SkillSelectionGUI selectionBtn;
private void Start()
{
Interface.instance.skillSelectionManager = this;
skills.ForEach(a => a.LoadData(this));
specialTab.gameObject.SetActive(false);
selectionTab.SetActive(false);
//selectionTab.SetActive(false);
}
public void UpdateSkillStatus()
{
skills.ForEach(a => a.UpdateSkillCount());
//if(SelectedID >= 7)
//{
// selectionBtn.icon.sprite = skills[SelectedID].icon.sprite;
// selectionBtn.countDown.fillAmount = skills[SelectedID].countDown.fillAmount;
// selectionBtn.selection.gameObject.SetActive(true);
//}
//else
//{
// selectionBtn.icon.sprite = noneIcon;
// selectionBtn.selection.gameObject.SetActive(false);
//}
if (SelectedID >= 7)
{
selectionBtn.icon.gameObject.SetActive(true);
selectionBtn.icon.sprite = skills[SelectedID].icon.sprite;
selectionBtn.amountText.text = DataManager.Instance.GetSkill(SelectedID).ToString();
selectionBtn.countDown.fillAmount = skills[SelectedID].countDown.fillAmount;
selectionBtn.selection.gameObject.SetActive(true);
}
else
{
selectionBtn.icon.gameObject.SetActive(false);
selectionBtn.countDown.fillAmount = 0f;
selectionBtn.selection.gameObject.SetActive(false);
}
}
public void Reload()
{
......@@ -49,7 +51,7 @@ public class SkillSelectionManager : MonoBehaviour
{
specialTab.gameObject.SetActive(false);
});
selectionTab.SetActive(SelectedID >= 7);
//selectionTab.SetActive(SelectedID >= 7);
}
else
{
......@@ -61,7 +63,7 @@ public class SkillSelectionManager : MonoBehaviour
}
public void CheckSpecialTab()
{
if(SelectedID < 7 && specialTab.gameObject.activeSelf)
if(specialTab.gameObject.activeSelf)
{
specialTab.localScale = Vector3.one;
specialTab.DOScale(Vector3.zero, 0.01f).OnComplete(() =>
......@@ -69,6 +71,6 @@ public class SkillSelectionManager : MonoBehaviour
specialTab.gameObject.SetActive(false);
});
}
selectionTab.SetActive(SelectedID >= 7);
//selectionTab.SetActive(SelectedID >= 7);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment