Пример #1
0
    void Awake()
    {
        // ��Ű�ڽ� ������Ʈ ���
        script = transform.GetComponent <LuckyBoxManager>();

        // �ʱ� ��ġ ���
        hidingPos = transform.position;
    }
Пример #2
0
    static void BlockLuckyBox(Player currentPlayer)
    {
        // 럭키박스 드랍테이블
        DropTable dropTable = new DropTable();

        // 드랍테이블 셋팅
        dropTable.rare = new List <int>();
        for (int i = 1; i < LuckyBox.table.Count; i++)
        {
            dropTable.rare.Add(LuckyBox.table[i].rare);
            Debug.Log("드랍 테이블 :: 추가됨 -> " + LuckyBox.table[i].rare);
        }
        Debug.LogWarning("드랍 테이블 :: 목록 총량 ->" + dropTable.rare.Count);

        // 드랍 테이블 작동 및 드랍대상 인덱스 확보
        int select = 1 + dropTable.Drop();

        Debug.LogWarning("럭키박스 :: 선택됨 -> " + select);

        // 테스트용 드랍 조작===================== 테스트 후 삭제할것
        select = 17;

        // 럭키박스 연출 시작
        LuckyBoxManager lbm = LuckyBoxManager.script;

        // 강제 초기화
        lbm.ClearForced();

        // 소환
        lbm.GetLuckyBox(currentPlayer);

        // 오픈
        lbm.Open();

        // 코루틴 초기화
        if (lbm.coroutineOpen != null)
        {
            lbm.StopCoroutine(lbm.coroutineOpen);
        }
        // 대기, 결과 출력, 효과 적용, 종료 판정
        lbm.coroutineOpen = lbm.StartCoroutine(lbm.WaitAndResult(LuckyBox.table[select], currentPlayer));

        // 스트링 입력
        lbm.SetTextByIndex(select);
    }