//本篇需结合 DoTween 插件
//肺部模拟:
// 先吸后呼,先变大再缩小
float beginTime = 0; //默认时间从0开始
bool breathe_IN = true; //默认吸气是执行的
bool method_IN = true; //默认允许吸气方法
bool breathe_OUT = false; //在默认情况下,允许吸气了,那么呼气肯定不允许
bool method_OUT = false; //在默认情况下,吸气方法允许了,那么呼气方法肯定不允许
void Update(){
if (breathe_IN)
{
beginTime += Time.deltaTime;
}
if( method_IN )
{
BreatheIn();
method_IN = false;
}
if (beginTime >= 2.1f)
// 当 吸入 到达2.1秒时,就不能再吸气了,接下来就是 呼气
{
//这一块分析有问题,是达到了2.1秒之后开始呼吸,这不符合需求 ( 已修改 )