private void viewTreasureUI(GameItemType itemType)
    {
        string str;

        switch (itemType)
        {
        case GameItemType.coin:
            return;

        case GameItemType.empty:
            str = "ハズレ";
            break;

        case GameItemType.jewel:
            str = "宝石獲得!";
            break;

        case GameItemType.bread:
            str = "ミルク獲得!";
            break;

        case GameItemType.securityCamera:
            str = "防犯センサー獲得!";
            break;

        case GameItemType.treasureCoin:
            str = "コイン獲得!";
            break;

        default:
            str = "空っぽだ...(ハズレ)";
            break;
        }
        popupMessage.SetMessage(str, 2, GamePopUpColor.white);
    }
    /// <summary>
    /// 菓子パン効果付与
    /// </summary>
    private void useSweet()
    {
        popupMessage.SetMessage("ミルクを飲んだ!", 1.5f, GamePopUpColor.white);
        sweetController.disableSweet();
        attackController.RecoveryCoolDown();
        AudioManager.Instance.PlaySEClipFromIndex(3, 0.8f);

        Vector3    t   = transform.position;
        Vector3    pos = new Vector3(t.x, t.y + 1f, t.z);
        GameObject s   = Instantiate(sweetEffect, pos, transform.rotation);

        Observable.Timer(System.TimeSpan.FromMilliseconds(5000)).
        Subscribe(_ => Destroy(s));
    }
Esempio n. 3
0
 void onAleart()
 {
     AudioManager.Instance.PlaySEClipFromIndex(11, 1f);
     popupMessage.SetMessage("猫がセンサーに見つかった!", 4, GamePopUpColor.yellow);
     alearted = true;
     animator.SetTrigger("on");
 }