This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <Windows.h> | |
#include <io.h> | |
#include <fcntl.h> | |
#include "ConsoleWindow.h" | |
int ConsoleWindow::m_hConsole = 0; | |
ConsoleWindow::ConsoleWindow(){ | |
m_hConsole = 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sets default values | |
AMyCubeActorTest::AMyCubeActorTest() | |
{ | |
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. | |
PrimaryActorTick.bCanEverTick = true; | |
// ダミーのルートコンポーネントを追加 | |
DummyRoot = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent")); | |
RootComponent = DummyRoot; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
VoidAction function([]() {std::cout << "きた" << std::endl; }); | |
function(); | |
function = []() {std::cout << "HelloWorld" << std::endl; }; | |
function.Invoke(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VoidAction{ | |
public: | |
// コンストラクタ、デストラクタの設定 | |
VoidAction() { | |
m_function = nullptr; | |
} | |
VoidAction(void(*function)(void)) { | |
m_function = (*function); |