zoukankan      html  css  js  c++  java
  • UE4 C++整理

    1.计时器

    首先要声名一个FTimeHandle,

    FTimeHandle   myHandle;  //myHandle相当与给定时器娶了一个名字?用来与其他定时器或是委托进行区分???

    定时器的使用方法:

    //参数:(FTimerHandle& InOutHandle, UserClass* InObj, typename FTimerDelegate::TUObjectMethodDelegate< UserClass >::FMethodPtr InTimerMethod, float InRate, bool InbLoop = false, float InFirstDelay = -1.f)

    GetWorld()->GetTimerManager().SetTimer(参数);

    GetWorld()->GetTimerManager().SetTimer(myHandle, this, &URAvataComponent::PlayShow, length, false);  //绑定引用了 &URAvataComponent::PlayShow,(① PlayShow方法在这里为什么没有“()”)

    关闭方法:

    GWorld->GetTimerManager().ClearTimer(myHandle); //停止并清除定时器

    GetWorldTimerManager().ClearTimer(myHandle);  //Aactor?

    ①:因为SetTimer()的参数只需要传 typename,并且这个这个方法不能带有产数?

  • 相关阅读:
    java ,js获取web工程路径
    js 无刷新分页代码
    js 获取时间对象代码
    jquery 文本框失去焦点显示提示信息&&单击置空文本框
    CodeForces
    nth_element() O(n)复杂度求第k+1小元素
    CodeForces
    HDU
    杜教BM
    J
  • 原文地址:https://www.cnblogs.com/fuhaiqing/p/13431284.html
Copyright © 2011-2022 走看看