Guest User

TTTGear.cpp

a guest
Jun 1st, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #include "ToTheThrone.h"
  4. #include "TTTGear.h"
  5.  
  6. // Sets default values
  7. ATTTGear::ATTTGear()
  8.     : model(CreateDefaultSubobject<UStaticMeshComponent>(TEXT("model")))
  9. {
  10.     // Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
  11.     PrimaryActorTick.bCanEverTick = false;
  12.     //model = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("model"));
  13.     init("", "", 0, 0, 0, 0, _wtNone);
  14. }
  15.  
  16. // Called when the game starts or when spawned
  17. void ATTTGear::BeginPlay()
  18. {
  19.     Super::BeginPlay();
  20. }
  21.  
  22. // Called every frame
  23. void ATTTGear::Tick( float DeltaTime )
  24. {
  25.     Super::Tick( DeltaTime );
  26. }
  27.  
  28. void ATTTGear::init(FString name, FString path, int lvlReq,
  29.     int strReq, int dexReq, int intReq, weaponType type)
  30. {
  31.     name = name;
  32.     path = path;
  33.     lvlReq = lvlReq;
  34.     strReq = strReq;
  35.     dexReq = dexReq;
  36.     intReq = intReq;
  37.     type = type;
  38.     if (path != "")
  39.     {
  40.         static ConstructorHelpers::FObjectFinder<UStaticMesh> gearModel(*path);
  41.         model->SetStaticMesh(gearModel.Object);
  42.     }
  43. }
Add Comment
Please, Sign In to add comment