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 "ToTheThrone.h"
- #include "TTTGear.h"
- // Sets default values
- ATTTGear::ATTTGear()
- : model(CreateDefaultSubobject<UStaticMeshComponent>(TEXT("model")))
- {
- // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
- PrimaryActorTick.bCanEverTick = false;
- //model = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("model"));
- init("", "", 0, 0, 0, 0, _wtNone);
- }
- // Called when the game starts or when spawned
- void ATTTGear::BeginPlay()
- {
- Super::BeginPlay();
- }
- // Called every frame
- void ATTTGear::Tick( float DeltaTime )
- {
- Super::Tick( DeltaTime );
- }
- void ATTTGear::init(FString name, FString path, int lvlReq,
- int strReq, int dexReq, int intReq, weaponType type)
- {
- name = name;
- path = path;
- lvlReq = lvlReq;
- strReq = strReq;
- dexReq = dexReq;
- intReq = intReq;
- type = type;
- if (path != "")
- {
- static ConstructorHelpers::FObjectFinder<UStaticMesh> gearModel(*path);
- model->SetStaticMesh(gearModel.Object);
- }
- }
Add Comment
Please, Sign In to add comment