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,并且这个这个方法不能带有产数?

  • 相关阅读:
    asp.net mvc 缓存
    C#版 Socket编程(最简单的Socket通信功能)
    c# 读取嵌入式文件
    js 对象 copy 对象
    double截取小数点位数
    c#读取excel
    观察者设计模式
    xml序列化方式
    sicily Huffman coding
    sicily Fibonacci 2
  • 原文地址:https://www.cnblogs.com/fuhaiqing/p/13431284.html
Copyright © 2011-2022 走看看