123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Scenes_YiLiao_SaoMiaoFX : MonoBehaviour
- {
- float colorRs1 = 0;
- float colorGs2 = 0;
- float colorBs3 = 0;
- private Color ChangeBabyToSaoMaoFXColor1(Color thisColors, bool isb, float addColorSpeed)
- {
- Color newColor;
- if (isb)
- {
- if (colorRs1 <= thisColors.r)
- {
- colorRs1 += Time.deltaTime * addColorSpeed;
- }
- if (colorGs2 <= thisColors.g)
- {
- colorGs2 += Time.deltaTime * addColorSpeed;
- }
- if (colorBs3 <= thisColors.b)
- {
- colorBs3 += Time.deltaTime * addColorSpeed;
- }
- newColor = new Color(colorRs1, colorGs2, colorBs3);
- }
- else
- {
- if (colorRs1 <= thisColors.r)
- {
- colorRs1 += Time.deltaTime * addColorSpeed;
- }
- if (colorGs2 <= thisColors.g)
- {
- colorGs2 += Time.deltaTime * addColorSpeed;
- }
- if (colorBs3 <= thisColors.b)
- {
- colorBs3 += Time.deltaTime * addColorSpeed;
- }
- newColor = new Color(colorRs1, colorGs2, colorBs3);
- }
- return newColor;
- }
- float colorRs11 = 0;
- float colorGs22 = 0;
- float colorBs33 = 0;
- private Color ChangeBabyToSaoMaoFXColor2(Color thisColors, bool isb, float addColorSpeed)
- {
- Color newColor;
- if (isb)
- {
- if (colorRs11 <= thisColors.r)
- {
- colorRs11 += Time.deltaTime * addColorSpeed;
- }
- if (colorGs22 <= thisColors.g)
- {
- colorGs22 += Time.deltaTime * addColorSpeed;
- }
- if (colorBs33 <= thisColors.b)
- {
- colorBs33 += Time.deltaTime * addColorSpeed;
- }
- newColor = new Color(colorRs11, colorGs22, colorBs33);
- }
- else
- {
- if (colorRs11 <= thisColors.r)
- {
- colorRs11 += Time.deltaTime * addColorSpeed;
- }
- if (colorGs22 <= thisColors.g)
- {
- colorGs22 += Time.deltaTime * addColorSpeed;
- }
- if (colorBs33 <= thisColors.b)
- {
- colorBs33 += Time.deltaTime * addColorSpeed;
- }
- newColor = new Color(colorRs11, colorGs22, colorBs33);
- }
- return newColor;
- }
- float colorRs111 = 0;
- float colorGs222 = 0;
- float colorBs333 = 0;
- private Color ChangeBabyToSaoMaoFXColor3(Color thisColors, bool isb, float addColorSpeed)
- {
- Color newColor;
- if (isb)
- {
- if (colorRs111 <= thisColors.r)
- {
- colorRs111 += Time.deltaTime * addColorSpeed;
- }
- if (colorGs222 <= thisColors.g)
- {
- colorGs222 += Time.deltaTime * addColorSpeed;
- }
- if (colorBs333 <= thisColors.b)
- {
- colorBs333 += Time.deltaTime * addColorSpeed;
- }
- newColor = new Color(colorRs111, colorGs222, colorBs333);
- }
- else
- {
- if (colorRs111 <= thisColors.r)
- {
- colorRs111 += Time.deltaTime * addColorSpeed;
- }
- if (colorGs222 <= thisColors.g)
- {
- colorGs222 += Time.deltaTime * addColorSpeed;
- }
- if (colorBs333 <= thisColors.b)
- {
- colorBs333 += Time.deltaTime * addColorSpeed;
- }
- newColor = new Color(colorRs111, colorGs222, colorBs333);
- }
- return newColor;
- }
- }
|