| | |
| | | return default(TalentElement);
|
| | | }
|
| | |
|
| | | public ArrowElement GetArrowElement(int index)
|
| | | {
|
| | | if (arrowElements != null && index < arrowElements.Count)
|
| | | {
|
| | | return arrowElements[index];
|
| | | }
|
| | | return default(ArrowElement);
|
| | | }
|
| | |
|
| | | public float GetPercentBySkillElement(int index, float viewHeight, float offset)
|
| | | {
|
| | | if (skillElements != null && index < skillElements.Count)
|
| | |
| | | #if UNITY_EDITOR
|
| | | public void ApplyTalentElement(int index,Vector3 _position)
|
| | | {
|
| | | if (skillElements == null)
|
| | | {
|
| | | skillElements = new List<TalentElement>();
|
| | | }
|
| | | var element = new TalentElement()
|
| | | {
|
| | | position = _position,
|
| | | };
|
| | | if (index >= skillElements.Count)
|
| | | {
|
| | | skillElements.Add(new TalentElement()
|
| | | {
|
| | | position = _position,
|
| | | });
|
| | | skillElements.Add(element);
|
| | | }
|
| | | else
|
| | | {
|
| | | skillElements[index] = new TalentElement()
|
| | | {
|
| | | position = _position,
|
| | | };
|
| | | skillElements[index] = element;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SyncElementsCount(int count)
|
| | | public void SyncTalentElementsCount(int count)
|
| | | {
|
| | | if (count < skillElements.Count)
|
| | | {
|
| | | skillElements.RemoveRange(count, skillElements.Count - count);
|
| | | }
|
| | | }
|
| | |
|
| | | public void ApplyArrowElement(int index, Vector3 _position, Vector2 _sizeDelta)
|
| | | {
|
| | | if (arrowElements == null)
|
| | | {
|
| | | arrowElements = new List<ArrowElement>();
|
| | | }
|
| | | var element = new ArrowElement()
|
| | | {
|
| | | position = _position,
|
| | | sizeDelta = _sizeDelta,
|
| | | };
|
| | | if (index >= arrowElements.Count)
|
| | | {
|
| | | arrowElements.Add(element);
|
| | | }
|
| | | else
|
| | | {
|
| | | arrowElements[index] = element;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SyncArrowElementsCount(int count)
|
| | | {
|
| | | if (count < arrowElements.Count)
|
| | | {
|
| | | arrowElements.RemoveRange(count, arrowElements.Count - count);
|
| | | }
|
| | | }
|
| | | #endif
|
| | |
| | | public struct ArrowElement
|
| | | {
|
| | | public Vector3 position;
|
| | | public Vector3 rotation;
|
| | | public Vector2 sizeDelta;
|
| | | }
|
| | | }
|