粒子延时显示

来源:互联网 发布:航海家软件破解版 编辑:程序博客网 时间:2024/06/08 06:01


延迟逻辑

 UParticleSystem* ps = UResMgr:: GetInstance()->GetParticle (_ele-> mResId); UParticleSystemComponent* psComp = nullptr; psComp = ps != nullptr ?                 UGameplayStatics::SpawnEmitterAttached (ps                                , _target->GetMesh ()                                , FName(* (_ele-> mBindPoint))                                , _ele->mLoc                                , _ele->mRotate ) : nullptr; if (ps != nullptr && psComp != nullptr ){      if (_ele ->mDelayTime > 0. f) //延时可见      {         psComp->SetVisibility (false);          psComp->CustomTimeDilation = 0.f;      }       else      {            psComp->SetVisibility (true);             psComp->CustomTimeDilation = 1.f;      }       psComp->SetRelativeScale3D (_ele-> mScale);       if (_isDurable )      {           int32 newUuid = ::IdGeneratorEffect();            _dstUuids.Add (newUuid);          //TODO 遍历中增加可能有问题,待验证           _bindArr.Add (FEffectBind( _ele, _time , newUuid, psComp));    }}
0 0