Advertisement
Guest User

Untitled

a guest
May 9th, 2015
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.45 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #include "niemamjuzsily.h"
  4. #include "MyPawn.h"
  5. #include "Engine.h"
  6. #include "MyAIController.h"
  7. // Sets default values
  8. AMyPawn::AMyPawn(const FObjectInitializer &ObjectInitializer) : Super(ObjectInitializer)
  9. {
  10.     MeszkaPawna = ObjectInitializer.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("PickupMesh"));
  11.  
  12.     static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMesh(TEXT("StaticMesh'/Game/StarterContent/Shapes/Shape_Sphere'"));
  13.     static ConstructorHelpers::FObjectFinder<UMaterial> Material_Blue(TEXT("MaterialInstanceConstant'/Game/StarterContent/Materials/M_Water_Lake.M_Water_Lake'"));
  14.  
  15.     MeszkaPawna->SetCollisionProfileName("BlockAll");
  16.     MeszkaPawna->SetStaticMesh(StaticMesh.Object);
  17.     MeszkaPawna->SetMaterial(0, Material_Blue.Object);
  18.     RootComponent = MeszkaPawna;
  19.  
  20.     AIControllerClass = AMyAIController::StaticClass();
  21.  
  22.  
  23.     PrimaryActorTick.bCanEverTick = true;
  24.  
  25.  
  26. }
  27.  
  28. // Called when the game starts or when spawned
  29. void AMyPawn::BeginPlay()
  30. {
  31.     if (GEngine) GEngine->AddOnScreenDebugMessage(4234, 5.f, FColor::Yellow, FString("Zrespilem"));
  32.     Super::BeginPlay();
  33.    
  34. }
  35.  
  36. // Called every frame
  37. void AMyPawn::Tick( float DeltaTime )
  38. {
  39.     Super::Tick( DeltaTime );
  40.  
  41. }
  42.  
  43. // Called to bind functionality to input
  44. void AMyPawn::SetupPlayerInputComponent(class UInputComponent* InputComponent)
  45. {
  46.     Super::SetupPlayerInputComponent(InputComponent);
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement