void OnEnable()
 {
     Slot = (EQUIPTYPE)int.Parse(gameObject.name);
     MPC  = transform.parent.parent.GetComponent <Tab_0>().MPC;
     EI   = transform.parent.parent.Find("EquipmentInfo").GetComponent <EquipmentInfo>();
     UpdateSlot();
 }
示例#2
0
 public virtual void UnEquip(EQUIPTYPE Slot)
 {
     Destroy(EquipPrefabs[(int)Slot]);
     PlayerData.Equipments[(int)Slot] = new Equipment();
     UpdateStats();
     //CacheManager.SaveCurrentPlayerInfo();
 }
示例#3
0
 public override void UnEquip(EQUIPTYPE Slot)
 {
     if (Client.Connected)
     {
         Client.Send(Protocols.UnEquipAction, new UnEquipActionData(Client.ClientID, (int)Slot));
         base.UnEquip(Slot);
     }
     else
     {
         base.UnEquip(Slot);
         SaveDevelopingPlayerData();
     }
 }
示例#4
0
 public Equipment(string name, EQUIPTYPE etype) : base(name)
 {
     EType = etype;
 }
示例#5
0
 public void UpdateEquippedSlot(EQUIPTYPE slot)
 {
     CSC.Tab_0.transform.Find("EquippedSlotButtons/" + (int)slot).GetComponent <EquippedButtonController>().UpdateSlot();
 }
示例#6
0
 public Equipment GetEquippedItem(EQUIPTYPE Slot)
 {
     return(PlayerData.Equipments[(int)Slot]);
 }