IEnumerator flip_deck_card(CCardPicture deck_card_picture) { Animator ani = deck_card_picture.GetComponentInChildren <Animator>(); ani.enabled = true; ani.Play("rotation"); // 덱에서 pop할때 회전 yield return(StartCoroutine(scale_to( deck_card_picture, 3.0f, 0.1f))); }
void move_card_to_floor(CCardPicture card_picture, CARD_EVENT_TYPE event_type) { byte slot_index = 0; Vector3 begin = card_picture.transform.position; Vector3 to = Vector3.zero; CVisualFloorSlot slot = this.floor_ui_slots.Find(obj => obj.is_same_card(card_picture.card.number)); if (slot == null) { byte empty_slot = find_empty_floorslot(); //Debug.Log(string.Format("empty slot pos " + empty_slot)); to = this.floor_slot_position[empty_slot]; slot_index = empty_slot; } else { to = get_ui_slot_position(slot); List <CCardPicture> floor_card_pictures = slot.get_cards(); for (int i = 0; i < floor_card_pictures.Count; ++i) { Animator ani = floor_card_pictures[i].GetComponentInChildren <Animator>(); ani.enabled = true; ani.Play("card_hit_under"); } slot_index = slot.ui_slot_position; if (event_type != CARD_EVENT_TYPE.BOMB) { CEffectManager.Instance.play_dust(to, 0.1f, false); } Animator card_ani = card_picture.GetComponentInChildren <Animator>(); card_ani.enabled = true; card_ani.Play("card_hit"); } // 바닥 카드로 등록. this.floor_ui_slots[slot_index].add_card(card_picture); move_card(card_picture, begin, to, 0.01f); }