



virtual void BeginPlay() override;//游戏开始时,被调用
virtual void Tick(float DeltaTime) override;//每一帧会被调用
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;//绑定输入(键盘或者鼠标)
变量:
在构造函数中:
AMainCharacter::AMainCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;//true-每帧都会调用Tick() false-每帧不会调用Tick()
}

aaa