private void UmbrellaControl() { if ((State == Utils.HumanState.isShooting || State == Utils.HumanState.isPreparingToShoot) && !IsOpenUmbrella) { SecondsForUmbrella += TimeCounter.CountSeconds(); } else if ((State == Utils.HumanState.immutable || State == Utils.HumanState.isbackingToCover) || IsOpenUmbrella) { SecondsForUmbrella -= TimeCounter.CountSeconds(); } if (SecondsForUmbrella >= openUmbrellaSeconds) { OpenUmbrella(); } if (SecondsForUmbrella <= 0) { CloseUmbrella(); } }