验证中...
开源中国 2018 年度最后一场技术盛会邀你来约~错过就要等明年啦!点此立即预约
语言: C/C++
分类: 游戏开发
最后更新于 2018-12-09 10:38
片段 1 片段 2
callblue.h
原始数据 复制代码
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "callblue.generated.h"
UCLASS()
class UI_API Acallblue : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
Acallblue();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
//以下函数将在蓝图编辑器中进行实现。
UFUNCTION(BlueprintImplementableEvent, Category = "Output")
//定义蓝图函数
void PrintOnScreen(int32 intoPrint);
};
callblue.cpp
原始数据 复制代码
// Fill out your copyright notice in the Description page of Project Settings.
#include "callblue.h"
// Sets default values
Acallblue::Acallblue()
{
// 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;
}
// Called when the game starts or when spawned
void Acallblue::BeginPlay()
{
Super::BeginPlay();
//调用蓝图函数
this->PrintOnScreen(39);
}
// Called every frame
void Acallblue::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}

评论列表( 0 )

你可以在登录后,发表评论

搜索帮助