コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        var currentColor = hostSprite.color;

        currentColor.r   = Ultilities.CalculateAsymptoticAverage(currentColor.r, targetColor.r, followPercentage);
        currentColor.b   = Ultilities.CalculateAsymptoticAverage(currentColor.b, targetColor.b, followPercentage);
        currentColor.g   = Ultilities.CalculateAsymptoticAverage(currentColor.g, targetColor.g, followPercentage);
        hostSprite.color = currentColor;
    }