Пример #1
0
 private bool CheckIsSlotEmpty()
 {
     if (_currentSlot.ReturnCountObject() <= 0 || _currentSlot.ReturnSprite() == null || _currentSlot.ReturnPrefab() == null)
     {
         SetMaxValueSlider(0);
         SetImageDrop(null, false);
         return(true);
     }
     return(false);
 }
Пример #2
0
 private GameObject CheckObjectItExist(ScriptableObject gameObject, Sprite sprite, List <GameObject> listGameObject)
 {
     foreach (GameObject slotControllerObj in listGameObject)
     {
         SlotController slotController = slotControllerObj.GetComponent <SlotController>();
         if (slotController.ReturnPrefab() == gameObject && slotController.ReturnSprite() == sprite)
         {
             return(slotControllerObj);
         }
     }
     return(null);
 }
Пример #3
0
 private GameObject FindSortEquipObject(List <GameObject> listGameObject)
 {
     foreach (GameObject slotControllerObj in listGameObject)
     {
         SlotController slotController = slotControllerObj.GetComponent <SlotController>();
         if (slotController.ReturnPrefab() == null && slotController.ReturnSprite() == null)
         {
             return(slotControllerObj);
         }
     }
     return(null);
 }
Пример #4
0
    private void DropObjectFromSlotMirror(SlotController slotController)
    {
        if (slotController != null)
        {
            if (slotController.ReturnPrefab() != null || slotController.ReturnSprite() != null || slotController.ReturnCountObject() > 0)
            {
                PlayerMirrorController playerMirrorController = this.gameObject.transform.root.GetComponent <PlayerMirrorController>();
                if (playerMirrorController != null)
                {
                    playerMirrorController.DropObjectServer(slotController.ReturnPrefab().name, CalculateInstantiateObjectDrop(), slotController.ReturnCountObject());
                    playerMirrorController.DestoryAllObjectInHandServer();
                }


                slotController.SetCount(0);
                slotController.SetPrefab(null);
                slotController.SetSprite(null, false);
            }
        }
    }