예제 #1
0
    //----------------------------------------

    //  扉ノックするイベント

    //----------------------------------------
    void Nock_Ivent(Knock_Order order_num)
    {
        if (kncok_f)
        {
            kncok_f = false;
            knock[(int)order_num].knock_num++;
        }

        if ((Input.GetKey(KeyCode.KeypadEnter) ||
             Input.GetButton("Botton_B")) && AudioManager.Instance.PlaySE_End())
        {
            AudioManager.Instance.PlaySE("nock");
            kncok_f = true;
            order   = order_num;
        }
    }
예제 #2
0
    //---------------------------------------

    //  初期化

    //---------------------------------------
    void Start()
    {
        transform.position.Set(transform.position.x, 1, transform.position.z);//後で直す
        param     = new P_param();
        param.pos = transform.position;



        for (int i = 0; i < knock.Length; i++)
        {
            knock[i]           = new Door_Knock();
            knock[i].knock_num = 0;
        }
        kncok_f = false;

        light.intensity = 0.6f;

        SetColor(over_fade, 1, 1, 1, 0);
        SetColor(next_clear, 1, 1, 1, 0);
        order = Knock_Order.NONE_DOOR;
    }
예제 #3
0
    void Ivent()
    {
        for (int i = 0; i < knock.Length; i++)
        {
            if (knock[i].knock_num == 1)
            {
                knock[i].b_knock = true;
            }
            else
            {
                knock[i].b_knock = false;
            }
        }

        switch (order)           //順番通りに扉をたたく(1->2->3->0)
        {
        case Knock_Order.DOOR_0: //一番最後の扉
            if (!knock[0].b_knock && knock[1].b_knock &&
                knock[2].b_knock && knock[3].b_knock)
            {
                next   = Game_Next.CLEAR;
                b_next = true;
            }
            else
            {
                order = Knock_Order.DOOR_FALSE;
            }

            break;

        case Knock_Order.DOOR_1:       //一番最初に叩くドア
            if (!knock[0].b_knock && !knock[1].b_knock &&
                !knock[2].b_knock && !knock[3].b_knock)
            {
                order = Knock_Order.NONE_DOOR;
            }
            else
            {
                order = Knock_Order.DOOR_FALSE;
            }
            break;

        case Knock_Order.DOOR_2:       //二番目に叩くドア
            if (!knock[0].b_knock && knock[1].b_knock &&
                !knock[2].b_knock && !knock[3].b_knock)
            {
                order = Knock_Order.NONE_DOOR;
            }
            else
            {
                order = Knock_Order.DOOR_FALSE;
            }
            break;

        case Knock_Order.DOOR_3:       //三番目に叩くドア
            if (!knock[0].b_knock && knock[1].b_knock &&
                knock[2].b_knock && !knock[3].b_knock)
            {
                order = Knock_Order.NONE_DOOR;
            }
            else
            {
                order = Knock_Order.DOOR_FALSE;
            }
            break;

        case Knock_Order.DOOR_FALSE:      //失敗した場合
            b_next = true;
            next   = Game_Next.OVER;
            break;

        case Knock_Order.NONE_DOOR:
            break;
        }
    }