Exemplo n.º 1
0
    //ルアーの色との相性 50 基準  100が最も悪い 
    int ColorFitess(int visibility)
    {
        int val = 50;

        int fac = (visibility - 50) / 2;

        //-25 25 良い 悪い

        if (fac > 0)
        {
            //視界悪いほど明るい 強く 黒い弱く
            val += (int)(fac * GetDarkness());
            val -= (int)(fac * GetBrightness());
        }
        else
        {
            //視界良い ほどナチュラル強く  他は悪くなる
            val -= (int)(fac * GetDarkness());
            val -= (int)(fac * GetBrightness());
            val += (int)(fac * GetNaturality());
        }

        //25-75

        //25% アースカラーほど強くなる
        if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.SAND)
        {
            val -= (int)(25 * GetDarkness());
            val -= (int)(25 * GetBrightness());
            val += (int)(25 * GetNaturality());
        }
        else if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.GREEN)
        {
            val -= (int)(25 * GetDarkness());
            val -= (int)(25 * GetBrightness());
            val += (int)(25 * GetNaturality());
        }
        else if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.BLUE)
        {
            val -= (int)(25 * GetDarkness());
            val -= (int)(25 * GetBrightness());
            val += (int)(25 * GetNaturality());
        }
        else if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.CLEAR)
        {
            val += (int)(25 * GetDarkness());
            val += (int)(25 * GetBrightness());
            val -= (int)(25 * GetNaturality());
        }

        //0-100
        val = PSGameUtils.ClampInte(val, 0, 100);
        tParams.colorVividNess = val;
        return(val);
    }
Exemplo n.º 2
0
    //0-100 50は中間値 ルアーカラーに影響するパラメータ
    int GetInWaterBrightness()
    {
        //水の色 10%
        int num = 50;

        //時間と天候 20%
        int num3 = 0;

        switch (GameController.Instance.skyParams.time)
        {
        case TimeOfDay.MORNIG:
            //天気 10% よければー 悪ければ+に
            if (GameController.Instance.GetCurrentWeather() == WeatherType.Sunny)
            {
                num = 55;
            }
            else
            {
                num = 60;
            }
            num3 = 40;
            break;

        case TimeOfDay.DAY:
            num3 = 50;
            break;

        case TimeOfDay.YU:
            //天気 10% よければー 悪ければ+に
            if (GameController.Instance.GetCurrentWeather() == WeatherType.Sunny)
            {
                num = 65;
            }
            else
            {
                num = 70;
            }
            num3 = 30;
            break;

        case TimeOfDay.NIGHT:
            num3 = 10;
            num  = 90;
            break;
        }

        float val = num3 / 100.0f;

        //水の色 15% よければー 悪ければ+に
        if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.SAND)
        {
            num += ((int)((val - GameController.Instance.waveParams.waveClearness) * 100.0f));
        }
        else if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.GREEN)
        {
            num += ((int)((val - GameController.Instance.waveParams.waveClearness) * 100.0f));
        }
        else if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.BLUE)
        {
            num += ((int)((val - GameController.Instance.waveParams.waveClearness) * 100.0f));
        }
        else if (GameController.Instance.waveParams.waveType_color == WAVETYPE_COLOR.CLEAR)
        {
            num += ((int)((val - GameController.Instance.waveParams.waveClearness) * 100.0f));
        }

        num = PSGameUtils.ClampInte(num, 0, 100);

        return(num);
    }
Exemplo n.º 3
0
    //0.3-1.0f
    public void UpdateAppealFactor()
    {
        if (currentTackle.lureNum == -1)
        {
            Debug.LogError("ルアー装備なし 適切に対処する");
            return;
        }

        int waterVisivility = 0;//100ほど悪い

        tParams.inwaterBrightNess = GetInWaterBrightness();
        waterVisivility           = tParams.inwaterBrightNess;

        int miness = 0;

        if (waterVisivility > 50)
        {
            //ラトルあり
            if (isLureHasAvility(2))
            {
                waterVisivility -= 20;
            }
            //匂いあり
            if (isLureHasAvility(4))
            {
                waterVisivility -= 20;
            }
        }

        //波の高さとスプラッシュ系
        if (GameController.Instance.waveParams.waveType == WAVETYPE.TALL)
        {
            if (isLureHasAvility(3))
            {
                waterVisivility += 5;
            }
        }
        else if (GameController.Instance.waveParams.waveType == WAVETYPE.STILL)
        {
            if (isLureHasAvility(3))
            {
                waterVisivility -= 5;
            }
        }
        waterVisivility = PSGameUtils.ClampInte(waterVisivility, 0, 100);

        //カラー相性 これで50 入ってくるので 0-100までになる
        int ColorFactor = ColorFitess(tParams.inwaterBrightNess);

        //100ほど悪い
        ColorFactor = ColorFactor - 50;

        waterVisivility += ColorFactor / 2;
        waterVisivility  = PSGameUtils.ClampInte(waterVisivility, 0, 100);


        float val = (50 - waterVisivility) / 100.0f;

        //-0.5 0.5 悪い 良い
        tParams.appealFactor = 1.0f - val;
    }