public void CreateTableCards() { GameObject tableCard = null; Transform tf = null; UIGamePlayerTableCard script = null; for (int i = 0; i < RoomModel.MAX_GAME_PLAYER_COUNT; i++) { tableCard = Instantiate(cardPrefab, Vector3.zero, Quaternion.identity); tf = tableCard.transform; tf.SetParent(tableCardParent.transform); tf.localPosition = dealerPosition; tf.localScale = new Vector2(0, 0); script = tableCard.GetComponent <UIGamePlayerTableCard>(); script.chairIndex = i; script.ImageSource = cardResources[i]; tableCard.SetActive(false); this.tableCards[i] = script; } }
private void OnClearComplete(UIGamePlayerTableCard card) { card.gameObject.SetActive(false); }