/// <summary>
 /// 「MOVE」での行動
 /// </summary>
 public void Action()
 {
     rM = GetComponent <ReelManager>();
     rM.pM.IniDisp();
     // 柄切替
     SwitchReelPattern(rM.TopReelPatterns);
     SwitchReelPattern(rM.BottomReelPatterns);
 }
示例#2
0
    private void Update()
    {
        deltaTime += Time.deltaTime;

        // レバーガイドの表示
        leverGuide.SetActive(deltaTime > WAIT_TIME);


        // 「↓」入力判別
        if (Input.GetKeyDown(KeyCode.DownArrow))
        {
            // 入力があった場合

            leverGuide.SetActive(false);

            // 切替
            var nextState = GetComponent <ReelMoveState>();
            nextState.enabled = true;
            lever.GetComponent <LeverController>().PullLever();
            rM = GetComponent <ReelManager>();
            rM.SwitchState(nextState);
            this.enabled = false;
        }
    }
示例#3
0
    /// <summary>
    /// Stopでの行動
    /// </summary>
    public void Action()
    {
        rM = GetComponent <ReelManager>();

        int count = 0;

        foreach (var reel in rM.TopReelPatterns)
        {
            if (reel.activeSelf)
            {
                topNum = count;
                count  = 0;
                break;
            }
            count++;
        }

        foreach (var reel in rM.BottomReelPatterns)
        {
            if (reel.activeSelf)
            {
                bottomNum = count;
                count     = 0;
                break;
            }
            count++;
        }
        Debug.Log("topNum:" + topNum);
        Debug.Log("bottomNum:" + bottomNum);


        // 上段の柄判別
        switch (topNum)
        {
        case (int)ReelManager.TOP_REEL_PATTERN.U_CROWN:
            Debug.Log("ウ冠");

            // ウ冠の場合
            if (bottomNum == (int)ReelManager.BOTTOM_REEL_STATUS.YAMA)
            {
                // 密、終了
                Debug.Log("みつ");
                rM.pM.DispBadMitsu();
                Wrong();
            }
            else if (bottomNum == (int)ReelManager.BOTTOM_REEL_STATUS.MUSHI)
            {
                Debug.Log("むし");
                rM.pM.DispMitsu();
                Right();
            }
            else if (bottomNum == (int)ReelManager.BOTTOM_REEL_STATUS.NONE)
            {
                Debug.Log("ひつ");
                rM.pM.DispHitsu();
                Right();
            }
            else if (bottomNum == (int)ReelManager.BOTTOM_REEL_STATUS.ME)
            {
                Debug.Log("もく");
                rM.pM.DispMoku();
                Right();
            }
            else
            {
                // 存在しない
                Debug.Log("なし");
                Retry();
            }
            break;

        case (int)ReelManager.TOP_REEL_PATTERN.KUSA_U_CROWN:
            // 草ウ冠
            Debug.Log("草ウ冠");

            if (bottomNum == (int)ReelManager.BOTTOM_REEL_STATUS.YAMA)
            {
                Debug.Log("びつ");
                rM.pM.DispBitsuMitsu();
                Right();
            }
            else
            {
                Debug.Log("なし");
                // 存在しない
                Retry();
            }


            break;

        case (int)ReelManager.TOP_REEL_PATTERN.TAKE_U_CROWA:
            // 竹ウ冠
            Debug.Log("竹ウ冠");


            if (bottomNum == (int)ReelManager.BOTTOM_REEL_STATUS.YAMA)
            {
                Debug.Log("べつ");
                rM.pM.DispBetsu();
                Right();
            }
            else
            {
                Debug.Log("なし");
                // 存在しない
                Retry();
            }
            break;
        }
    }