public void SetDice(EventDice _dice) { // 이미 슬롯이 차있으면 if (dice != null) { // 슬롯 비우기 ClearSlot(); } dice = _dice; _dice.transform.SetParent(diceSlot); _dice.transform.localPosition = Vector3.zero; }
// 입력된 수만큼 주사위 생성. // Enemy측에서 장착하기 위해 주사위 배열 반환기능 추가함. public EventDice[] CreateDice(int amount) { EventDice[] dices = new EventDice[amount]; // 아군 갯수만큼 주사위 생성 for (int i = 0; i < amount; i++) { GameObject o = Instantiate(DicePrefab, DiceZone.transform); dices[i] = o.GetComponent <EventDice>(); dices[i].SetNumber(); } return(dices); }
public void ClearSlot() { // 주사위 존으로 되돌린다. if (dice) { dice.SetIsOnSlot(false); bcm.SetDiceZone(dice); } // 주사위 정보 초기화 dice = null; // 타겟관련 버튼들 비활성화 MarkerButton.SetActive(false); ActionButton.SetActive(false); RangePannel.SetActive(false); }
public void SetDiceZone(EventDice _d) { _d.transform.SetParent(DiceZone.transform); }
public void SetDragDice(EventDice _d) { dragDice = _d; }