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

no message

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