YotogiOldSkillUnitVR.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using UnityEngine;
  3. public class YotogiOldSkillUnitVR : MonoBehaviour
  4. {
  5. public void Awake()
  6. {
  7. this.icon_ = UTY.GetChildObject(base.gameObject, "Parent/SkillIcon", false).GetComponent<YotogiOldSkillIcon>();
  8. this.name_label_ = UTY.GetChildObject(base.gameObject, "Parent/Text", false).GetComponent<UILabel>();
  9. this.btn_ = base.GetComponentInChildren<UIButton>();
  10. this.normal_sprite_name_ = this.btn_.normalSprite;
  11. this.hover_sprite_name_ = this.btn_.hoverSprite;
  12. this.box_collider_size_ = this.btn_.GetComponent<BoxCollider>().size;
  13. }
  14. public void SetSkillData(YotogiOld.VRSkillData set_skill_data)
  15. {
  16. this.skill_data_ = set_skill_data;
  17. this.name_label_.text = this.skill_data_.skill.name;
  18. this.icon_.SetSkillData(this.skill_data_.skill);
  19. }
  20. public bool isSelect
  21. {
  22. get
  23. {
  24. return this.btn_.normalSprite == this.hover_sprite_name_;
  25. }
  26. set
  27. {
  28. this.btn_.normalSprite = ((!value) ? this.normal_sprite_name_ : this.hover_sprite_name_);
  29. }
  30. }
  31. public YotogiOld.VRSkillData skill_data
  32. {
  33. get
  34. {
  35. return this.skill_data_;
  36. }
  37. }
  38. private YotogiOldSkillIcon icon_;
  39. private UILabel name_label_;
  40. private YotogiOld.VRSkillData skill_data_;
  41. private UIButton btn_;
  42. private string normal_sprite_name_;
  43. private string hover_sprite_name_;
  44. private Vector3 box_collider_size_;
  45. }