Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #include "niemamjuzsily.h"
- #include "MyPawn.h"
- #include "Engine.h"
- #include "MyAIController.h"
- // Sets default values
- AMyPawn::AMyPawn(const FObjectInitializer &ObjectInitializer) : Super(ObjectInitializer)
- {
- MeszkaPawna = ObjectInitializer.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("PickupMesh"));
- static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMesh(TEXT("StaticMesh'/Game/StarterContent/Shapes/Shape_Sphere'"));
- static ConstructorHelpers::FObjectFinder<UMaterial> Material_Blue(TEXT("MaterialInstanceConstant'/Game/StarterContent/Materials/M_Water_Lake.M_Water_Lake'"));
- MeszkaPawna->SetCollisionProfileName("BlockAll");
- MeszkaPawna->SetStaticMesh(StaticMesh.Object);
- MeszkaPawna->SetMaterial(0, Material_Blue.Object);
- RootComponent = MeszkaPawna;
- AIControllerClass = AMyAIController::StaticClass();
- PrimaryActorTick.bCanEverTick = true;
- }
- // Called when the game starts or when spawned
- void AMyPawn::BeginPlay()
- {
- if (GEngine) GEngine->AddOnScreenDebugMessage(4234, 5.f, FColor::Yellow, FString("Zrespilem"));
- Super::BeginPlay();
- }
- // Called every frame
- void AMyPawn::Tick( float DeltaTime )
- {
- Super::Tick( DeltaTime );
- }
- // Called to bind functionality to input
- void AMyPawn::SetupPlayerInputComponent(class UInputComponent* InputComponent)
- {
- Super::SetupPlayerInputComponent(InputComponent);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement