Created
March 16, 2015 05:39
-
-
Save anonymous/5d42c9e3418204176d0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SpellWorld.h" | |
#include "RandomProjectile.h" | |
ARandomProjectile::ARandomProjectile(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) | |
{ | |
int min = 1; | |
int max = 5; | |
int randNum = rand() % max + min; | |
int randNum2 = rand() % 10000 + 10; | |
this->SetScale(FVector(randNum, randNum, randNum)); | |
this->SetSpeed(randNum2); | |
//this->SetLifeSpan(randNum); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "SpellWorldProjectile.h" | |
#include "RandomProjectile.generated.h" | |
UCLASS(config = Game) | |
class ARandomProjectile : public ASpellWorldProjectile | |
{ | |
public: | |
GENERATED_BODY() | |
//Constructor | |
ARandomProjectile(const FObjectInitializer& ObjectInitializer); | |
////Called when projectile hits something | |
//UFUNCTION() | |
//void OnHit(AActor* otherActor, UPrimitiveComponent* otherComp, FVector normalImpulse, const FHitResult& hit); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment