Esempio n. 1
0
    override public void CustomerReact(FriedFood friedFood, AddPointDelegate addPointDelegate)
    {
        switch (friedFood.FriedFoodReview)
        {
        case Cooking.FriedFoodReview.good:
            addPointDelegate(1, 300);
            break;

        case Cooking.FriedFoodReview.usually:
            addPointDelegate(0, 100);
            break;

        case Cooking.FriedFoodReview.raw:
            addPointDelegate(0, 100);
            break;

        case Cooking.FriedFoodReview.bad:
            addPointDelegate(0, -(friedFood.Calorie - 100));
            break;
        }

        clearCalorie -= friedFood.Calorie;

        //アニメーション
        StartCoroutine(AnimeReacion(friedFood));
    }
Esempio n. 2
0
    protected IEnumerator AnimeReacion(FriedFood friedFood)
    {
        //アニメーション
        switch (friedFood.FriedFoodReview)
        {
        case Cooking.FriedFoodReview.good:
            animator.SetBool("good", true);
            animator.SetBool("angry", false);
            animator.SetBool("saitei", false);
            break;

        case Cooking.FriedFoodReview.usually:
            animator.SetBool("good", false);
            animator.SetBool("angry", true);
            animator.SetBool("saitei", false);
            break;

        case Cooking.FriedFoodReview.raw:
            animator.SetBool("good", false);
            animator.SetBool("angry", true);
            animator.SetBool("saitei", false);
            break;

        case Cooking.FriedFoodReview.bad:
            animator.SetBool("good", false);
            animator.SetBool("angry", false);
            animator.SetBool("saitei", true);
            break;
        }
        yield return(new WaitForSeconds(1));

        //クリア判定
        CheckClear();
    }
Esempio n. 3
0
    void CompletedFriedFood(FriedFood friedFood)
    {
        //ゲームオーバーの時はここで止まる
        if (IsTimeOver)
        {
            return;
        }
        if (friedFood == null)
        {
            currentCustomer.CustomerReact(null);
            return;
        }

        //コンボ処理
        if (friedFood.FriedFoodReview == Cooking.FriedFoodReview.good)
        {
            Combo++;
        }
        else
        {
            maxCombo = Math.Max(maxCombo, Combo);
            Combo    = 0;
        }

        GameObject dish = Instantiate(foodDish, new Vector3(3.13f, -4.01f, 0), Quaternion.identity);

        dish.GetComponent <DishController>().SetData(currentCustomer, friedFood);

        //currentCustomer.CustomerReact(friedFood);
    }
Esempio n. 4
0
    override public void CustomerReact(FriedFood friedFood)
    {
        if (friedFood != null)
        {
            currentCalorie -= friedFood.Calorie;
            CalorieGageAction(ClearCalorie, currentCalorie);
        }

        base.CustomerReact(friedFood);
    }
Esempio n. 5
0
    override protected void SaveScore(FriedFood friedFood)
    {
        switch (friedFood.FriedFoodReview)
        {
        case Cooking.FriedFoodReview.good:
            totalGage = 2;
            break;

        case Cooking.FriedFoodReview.usually:
            totalGage = 0;
            break;

        case Cooking.FriedFoodReview.raw:
            totalGage = 0;
            break;

        case Cooking.FriedFoodReview.bad:
            totalGage = 0;
            break;
        }

        //一度でもbadを取っていればスコアは-3000固定
        if (totalScore == -3000)
        {
            return;
        }
        //バッドは取っていないがミスをしている場合
        else if (totalScore == 1000)
        {
            totalScore = friedFood.FriedFoodReview == Cooking.FriedFoodReview.bad ? -3000 : totalScore;
            return;
        }

        switch (friedFood.FriedFoodReview)
        {
        case Cooking.FriedFoodReview.good:
            totalScore = 3000;
            break;

        case Cooking.FriedFoodReview.usually:
            totalScore = 1000;
            break;

        case Cooking.FriedFoodReview.raw:
            totalScore = 1000;
            break;

        case Cooking.FriedFoodReview.bad:
            totalScore = -3000;
            break;
        }
    }
Esempio n. 6
0
    void CompletedFriedFood(FriedFood friedFood)
    {
        //揚げ物を敵に渡す
        //敵による揚げ物評価(スコア処理未実装)
        if (friedFood != null)
        {
            //●ここら辺もっときれいにできる気がする●
            currentCustomer.CustomerReact(friedFood,
                                          (int rushGage, int score) =>
            {
                RushGage += rushGage;
                Score    += IsRush ? (int)(score * 1.5f) : score;
                Debug.Log(score);
            });

            //コンボ処理
            if (friedFood.FriedFoodReview == Cooking.FriedFoodReview.good)
            {
                combo++;
            }
            else
            {
                maxCombo = combo > maxCombo ? combo : maxCombo;
                combo    = 0;
            }
        }
        else
        {
            currentCustomer.DoAction();
        }

        //あみだのリセット
        for (int i = 0; i < AmidaLines.GetLength(0); i++)
        {
            for (int j = 0; j < AmidaLines.GetLength(1); j++)
            {
                AmidaLines[i, j].SetOnObjActivation(false);
            }
        }
    }
Esempio n. 7
0
    override protected void SaveScore(FriedFood friedFood)
    {
        switch (friedFood.FriedFoodReview)
        {
        case Cooking.FriedFoodReview.good:
            totalScore += 300;
            totalGage  += 1;
            break;

        case Cooking.FriedFoodReview.usually:
            totalScore += 100;
            break;

        case Cooking.FriedFoodReview.raw:
            totalScore += 100;
            break;

        case Cooking.FriedFoodReview.bad:
            totalScore -= friedFood.Calorie - 100;
            break;
        }
    }
Esempio n. 8
0
    public FriedFood DoFry(Cooking.OilTemp oil)
    {
        FriedFood friedFood;

        //ラッシュアイテムを取得していれば必ずGOOD
        if (rushItemCount >= 1)
        {
            Debug.Log("rush");
            friedFood = new FriedFood(Cooking.FriedFoodReview.good, this.calorie, foodType);
        }
        //マイナスアイテムを取得していれば腐り状態
        else if (badItemCount >= 1)
        {
            Debug.Log("bad");
            friedFood = new FriedFood(Cooking.FriedFoodReview.bad, this.calorie, foodType);
        }
        else
        {
            //油の温度が適正、材料全てがノルマ以上取得していれば揚げ成功
            if (oil == OilTemp && eggCount >= clearEggNum && komugikoCount >= clearKomugikoNum && pankoCount >= clearPankoNum)
            {
                Debug.Log("good");
                friedFood = new FriedFood(Cooking.FriedFoodReview.good, this.calorie, foodType);
            }
            //材料を全く取得していなければ素揚げ、生?
            else if (eggCount == 0 && komugikoCount == 0 && pankoCount == 0)
            {
                Debug.Log("row");
                friedFood = new FriedFood(Cooking.FriedFoodReview.raw, this.calorie, foodType);
            }
            //それ以外なら揚げ失敗
            else
            {
                Debug.Log("usually");
                friedFood = new FriedFood(Cooking.FriedFoodReview.usually, this.calorie, foodType);
            }
        }
        return(friedFood);
    }
Esempio n. 9
0
    protected IEnumerator AnimeReacion(FriedFood friedFood)
    {
        //アニメーション
        if (friedFood != null)
        {
            successFriedFoodNum++;
            SaveScore(friedFood);

            switch (friedFood.FriedFoodReview)
            {
            case Cooking.FriedFoodReview.good:
                animator.SetBool("good", true);
                animator.SetBool("angry", false);
                animator.SetBool("saitei", false);
                break;

            case Cooking.FriedFoodReview.usually:
                animator.SetBool("good", false);
                animator.SetBool("angry", true);
                animator.SetBool("saitei", false);
                break;

            case Cooking.FriedFoodReview.raw:
                animator.SetBool("good", false);
                animator.SetBool("angry", true);
                animator.SetBool("saitei", false);
                break;

            case Cooking.FriedFoodReview.bad:
                animator.SetBool("good", false);
                animator.SetBool("angry", false);
                animator.SetBool("saitei", true);
                break;
            }
            yield return(new WaitForSeconds(1));
        }
        CookedFoodNum++;
    }
Esempio n. 10
0
    public void SetData(Customer customer, FriedFood friedFood)
    {
        currentCustomer = customer;
        this.friedFood  = friedFood;
        switch (friedFood.FoodType)
        {
        case Cooking.FoodType.beef:
            food.sprite = friedBeef;
            break;

        case Cooking.FoodType.chicken:
            food.sprite = friedChicken;
            break;

        case Cooking.FoodType.pork:
            food.sprite = friedPork;
            break;

        case Cooking.FoodType.shrimp:
            food.sprite = friedShrimp;
            break;
        }
    }
Esempio n. 11
0
    virtual public void CustomerReact(FriedFood friedFood, AddPointDelegate addPointDelegate)
    {
        switch (friedFood.FriedFoodReview)
        {
        case Cooking.FriedFoodReview.good:
            addPointDelegate(1, 300);
            break;

        case Cooking.FriedFoodReview.usually:
            addPointDelegate(0, 100);
            break;

        case Cooking.FriedFoodReview.raw:
            addPointDelegate(0, 100);
            break;

        case Cooking.FriedFoodReview.bad:
            addPointDelegate(0, -500);
            break;
        }

        //アニメーション
        StartCoroutine(AnimeReacion(friedFood));
    }
Esempio n. 12
0
 virtual public void CustomerReact(FriedFood friedFood)
 {
     StartCoroutine(AnimeReacion(friedFood));
 }