Exemplo n.º 1
0
    private void DropObjectFromCharacter()
    {
        PlayerMirrorController playerMirrorController = this.gameObject.transform.root.GetComponent <PlayerMirrorController>();

        if (playerMirrorController != null)
        {
            if (_currentSlot.ReturnPrefab() != null)
            {
                playerMirrorController.DropObjectServer(_currentSlot.ReturnPrefab().name, TranfromDropObjectFromCharacter(), _sliderCount.value);
            }
        }
    }
Exemplo n.º 2
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);
            }
        }
    }